Changelog

All notable changes to CodePrettify are documented here.

v1.0.5 Latest March 17, 2026

✨ New Features

  • Base64 & JWT Decode Modal — Clicking a JSON decode icon now opens a dedicated modal showing both the original encoded value and the decoded content in separate read-only textareas, making long payloads much easier to inspect and copy.
  • Regex Search — Added regex support to the floating search bar using /pattern/flags syntax, while keeping plain-text search as the default. Invalid regex input now shows an inline error instead of failing silently.
  • Persistent View State — Added capped per-URL state storage in extension local storage so fold state, search text, highlighted line, and display mode are restored automatically for recently viewed files, while keeping the existing shareable URL-hash state.
  • Document Navigator — Added a new outline navigator for JSON, JavaScript, and XML/RSS documents so large files can be browsed structurally and jumped to quickly from the More menu.
  • Diagnostics & Warnings — Added a diagnostics panel that combines syntax status, document warnings such as very long lines or mixed indentation, and file-type-specific insights for JSON, JS, CSS, and XML/RSS.

🔧 Improvements

  • CSV Export Guardrails — Tightened Download as CSV so it only enables for table-like data. JSON export now requires a top-level array of flat objects, while RSS export requires at least one item or entry with child fields. When the structure does not qualify, the CSV option is disabled and explains why.
  • CSV Explainability — Expanded CSV export feedback with readiness details such as detected rows, columns, root type, and unavailable-state reasons in both the download flow and diagnostics panel.
  • UX (Decode Tooltip Label) — Updated the hover tooltip for Base64/JWT values to clearly label the content as decoded output before showing the decoded value.

🐛 Bug Fixes

  • Bug Fix (JSON Folding State) — Fixed an intermittent issue where prettified JSON could appear stuck in a collapsed one-line state. JSON folding now uses structural line metadata instead of counting braces/brackets in rendered text, so string values containing {, }, [, or ] no longer corrupt expand/collapse behavior or restored fold state.
  • Bug Fix (cURL Generator on Windows) — Fixed generated cURL commands failing in Windows shells. The command generator now strips the extension's shareable view-state hash from copied URLs and emits Windows-safe curl.exe commands with compatible quoting for headers and URLs.
  • Bug Fix (Base64/JWT Decode Rendering) — Fixed JSON decode affordances not appearing reliably because the structured JSON renderer could fall back to plain Prism output when localized decode labels were not available inside the JSON handler.
  • Bug Fix (Decode Icon Click Conflict) — Fixed decode icon clicks also triggering the JSON path inspector. Decode icon interactions are now isolated from the JSON value click handler.
  • Bug Fix (Decode Modal Selection) — Fixed the decode modal closing while selecting text inside its textareas. The modal now closes only when clicking outside the modal surface.
  • Bug Fix (XML Loader Crash) — Fixed the lightweight page loader crashing on some raw XML and XHTML documents opened from file: URLs because the root element did not expose dataset. The loader now uses a plain root attribute marker instead of documentElement.dataset, so supported XML files can be detected and injected safely.
v1.0.4 March 16, 2026

✨ New Features

  • cURL / fetch Generator — Generate copy-pasteable cURL and fetch() commands for the current URL, including captured safe request headers such as Accept, Accept-Language, Origin, and Referer when available, directly from the More menu in the floating toolbar.
  • Timestamp Formatter — Detect Unix timestamps (seconds and milliseconds) and ISO 8601 date strings in JSON values and show human-readable date/time tooltips on hover.
  • Clickable URLs in JSON — URL string values in JSON are now detected and rendered as clickable links, including URLs embedded within longer string values, similar to the existing RSS/XML link feature.
  • Export to CSV — Convert structured JSON objects/arrays or RSS/Atom feed items into downloadable CSV tables directly from the page.
  • Code Minimap — A scrollable, syntax-aware minimap injected on the right edge of the screen for quick navigation through large document structures. Can be disabled in settings and automatically hides on short files.
  • Beautify to Image — Export a cropped PNG rendering of the currently visible formatted code natively via <canvas>.
  • Base64 & JWT Decoding — Inline tooltips that securely decode Base64 payloads and JWT tokens hovering directly over the JSON values.
  • HTTP Context Panel — Added a request details panel that shows status code, content type, encoding, response size hints, timing information, and response headers for the currently formatted resource.
  • JSON Path Tools — Added a JSON path inspector for the selected breadcrumb path plus query support for quickly locating matching values in large JSON documents.
  • Shareable View State — Added URL-hash state sharing so search text, line navigation, fold state, and view settings can be restored from a copied link.

🔧 Improvements

  • Toolbar — Reduced the floating toolbar clutter by moving secondary actions into a compact More menu that opens on hover or keyboard focus.
  • JSON Interaction Settings — Split JSON hover breadcrumbs from click-to-open inspector behavior. Hover breadcrumbs are now disabled by default, while JSON inspector on click is enabled by default and configurable in settings.
  • Performance — Replaced global CSS/script content script injection with a lightweight detector plus on-demand background injection for supported raw-code pages.
  • Localization — Moved runtime UI strings into Chrome/Firefox locale bundles so the extension uses one i18n system instead of a separate lang.json file.
  • Accessibility — Improved modal keyboard handling with focus trapping, ESC-to-close behavior, button semantics, and better ARIA labels.
  • Security — Tightened the sandbox CSP and added stricter message validation in the syntax-checking sandbox.

🐛 Bug Fixes

  • Word Wrap Fix — Fixed word wrap so it now applies correctly to rendered JSON lines in pretty view instead of being overridden by per-line white-space rules.
  • Bug Fix (ES Module Validation) — Fixed false syntax error warnings on valid JavaScript files that use ES module import/export statements. The sandbox validator now detects module syntax and skips the classic-script wrapper check.
  • Bug Fix (Breadcrumb Localization) — Replaced hardcoded breadcrumb tooltip strings such as "Jump to root" and "Copy path" with localized messages from the locale bundles, and propagated the newer JSON settings labels across all locale bundles.
v1.0.3 March 14, 2026

🐛 Bug Fixes

  • Prism.js Auto-Highlighting — Fixed Prism.js running highlightAll() on every website, which could break syntax highlighting on sites like GitHub, Stack Overflow, and MDN. Prism is now set to manual mode so it only highlights within the extension's own container.
  • CSS Leaking to Other Sites — Fixed unscoped .token CSS rules (syntax highlighting colors) being injected globally on all pages. All token styles are now scoped under #pretty-container to prevent interference with other websites.
  • View Source Interference — Added protocol guards to prevent the extension from activating on view-source:, chrome:, and about: pages.
v1.0.2 January 28, 2026

✨ New Features

  • Content-Type Detection — The extension now detects file types using HTTP Content-Type headers in addition to URL file extensions. This enables proper formatting of API endpoints like https://api.github.com/users/github that serve JSON without a .json extension.

🐛 Bug Fixes

  • RSS Code Folding — Fixed collapse/expand functionality for RSS/XML files not working correctly. Rewrote the fold system to use data attributes and indexed line access, matching the JS handler approach.
  • Toolbar Buttons — Fixed collapse/expand buttons in the toolbar not appearing or disappearing dynamically when toggling the code folding setting. Buttons are now always created for supported file types and show/hide based on settings.
  • Page Rendering — Fixed an issue where normal websites could turn white when the extension loaded. Added a pre-check loader that only applies content hiding for supported file types.
v1.0.1 January 27, 2026

✨ New Features

  • RSS/Atom Feed Support — New file format support for .rss and .atom files with syntax highlighting, auto-formatting, code folding for XML elements, clickable URLs (with entity decoding), and feed statistics (tags, attributes, namespaces, etc.).
  • Code Folding (JS) — Collapse/expand functions, classes, objects, and code blocks. Hover over a foldable line to see the fold toggle. Use Collapse All / Expand All buttons in the toolbar. Can be enabled/disabled in settings.
  • Bracket Matching (JS) — Hover over {, (, or [ to highlight its matching pair. Both brackets are highlighted with visual feedback. Can be enabled/disabled in settings.
  • Code Folding Setting (JSON) — Added a setting to enable/disable the collapsible JSON feature.
  • Code Statistics Panel — View file size, line count, and character count. Language-specific stats: JSON (object depth, key count, array sizes), JS (function count, variable count), CSS (selector count, rule count, media queries).
  • Hex/RGB Color Preview (CSS) — Color swatches appear next to color values. Click to copy color in different formats. Includes a color picker.
  • Breadcrumb Navigation (JSON) — Shows path like root › data › users[0] › name when hovering/clicking. Click any breadcrumb to jump to that level.
  • Clickable URLs & Imports — URLs in strings and import/require paths are now clickable links.

🔧 Improvements

  • Unified Layout — Adjusted all modal windows, toolbars, and UI elements to use CSS variables instead of hardcoded colors for consistent theming.
  • Enhanced Syntax Checker — Removed vanilla JavaScript validation and replaced it with a sandboxed environment for safer and more accurate syntax checking.

🐛 Bug Fixes

  • RSS Feed Rendering — Fixed issue where RSS feeds opened in a background tab (XHTML mode) failed to render correctly or caused high CPU usage. Now waits for tab visibility before rendering.
v1.0.0 Initial Release January 2026

🚀 Smart Automation

  • Auto-Format: Automatically detects messily formatted code and beautifies it with your preferred indentation
  • Intelligent Minification Detection: Analyzes code density—if a file is minified, it formats it automatically; if it's already clean, it adds syntax highlighting
  • Local File Support: Works seamlessly on web URLs and local files (file://) opened in the browser
  • Zero-Flash Loading: Engineered to prevent raw text from flashing before the beautifier loads

🛡️ Syntax Validation & Error Checking

Don't just read code—debug it. CodePrettify scans your files for common errors with instant feedback.

  • JSON: Detects syntax errors and provides the exact line number
  • JavaScript: Identifies mismatched braces, brackets, and common typos
  • CSS: Validates structural integrity
  • Instant Feedback: Invalid code triggers non-intrusive toast notifications with error details

📂 Interactive JSON Viewer

  • Collapsible Data: Fold arrays and objects to navigate large datasets easily
  • Smart Previews: See summary info (e.g., Array(5) or {3 keys}) when blocks are collapsed
  • Clickable Links: URLs inside JSON strings automatically become clickable hyperlinks
  • Expand/Collapse All: Dedicated buttons to manage massive JSON files instantly

🛠️ Powerful Toolkit

  • Advanced Search: Custom search bar (Ctrl+F) with result counting and navigation—works even on huge files
  • Go To Line: Jump straight to specific lines (Ctrl+G), perfect for debugging stack traces
  • Export Options: Download your file in three formats: Original, Formatted, or Minified
  • Copy to Clipboard: Quick one-click copy functionality

⚙️ Fully Customizable

  • Themes: Choose between Light, Dark, or Auto (syncs with system)
  • Format Settings: Adjustable font size (10-24px), indentation (2 or 4 spaces), and line numbers
  • Privacy First: 100% client-side—your code never leaves your browser

⌨️ Keyboard Shortcuts

  • Ctrl+B — Toggle Raw/Pretty view
  • Ctrl+Alt+C — Copy to Clipboard
  • Ctrl+F — Open Search Toolbar
  • Ctrl+G — Go to Line
  • Ctrl+Alt+T — Toggle Toolbar

🌐 Multi-Language Support

Supports 14 languages including English, Norwegian, German, Spanish, and Chinese.