No matching section
Try a shorter term, clear the product filter, or search for the name shown in the Tools or More Actions menu.
Getting started
CodePrettify turns supported code, data, configuration, documentation, and feed files into a read-only working view. It keeps the original text available while adding formatting, validation, navigation, conversion, and inspection tools.
Browser extension
- Install from the Chrome Web Store, Microsoft Edge Add-ons, or the supported Firefox distribution.
- Open a supported raw HTTP/HTTPS resource. CodePrettify recognizes the URL extension or response content type and replaces the plain browser page with its viewer.
- For a local file, open the extension launcher and drag the file in or choose it. Direct
file://URLs additionally require the browser’s Allow access to file URLs permission. - Use Prettified/Raw, or Rendered/Source for markup, to change representation without changing the source file.
Windows app
- Open a file with Ctrl+O, drag files into the window, use a file association/Explorer command, or choose File > Paste & Prettify.
- Each file opens in a tab. New installations start in Prettified, Rendered, or Table view according to the file type.
- Use native Save/Save As when you want to write the selected representation back to disk.
Supported formats
| Format | Extensions | Extension | Windows app | Default view |
|---|---|---|---|---|
| JavaScript / TypeScript | .js .mjs .cjs .ts .mts .cts | Yes | Yes | Prettified |
| JSON / JSONC | .json .jsonc | Yes | Yes | Prettified |
| JSON Lines / NDJSON | .jsonl .ndjson | Yes | Yes | Prettified |
| YAML | .yaml .yml | Yes | Yes | Prettified |
| TOML | .toml | Yes | Yes | Prettified |
| Markdown | .md .markdown | Yes | Yes | Rendered |
| CSS | .css | Yes | Yes | Prettified |
| XML / RSS / Atom | .xml .rss .atom | Yes | Yes | Rendered |
| CSV | .csv | No | Yes | Table |
| HTML | .html .htm | No | Yes | Rendered |
The extension can also activate when a supported response MIME type is returned without a recognizable filename. It intentionally leaves normal HTML pages alone. The Windows app can use Paste & Prettify to detect a format even when no filename exists.
The viewer workspace
Representations
- Prettified shows indentation, syntax highlighting, folding, links, and inline helpers. Raw shows the original text.
- Markdown, XML/feed, and app HTML use Rendered/Source where a safe rendered view is available.
- The formatting indicator reports whether formatting succeeded. A validation alert provides an exact line/column when the parser can locate the problem.
- Ctrl+B toggles the two views. Your first-install default remains Prettified/Rendered until changed in Settings.
Editor and status
Line numbers, word wrap, folding, the minimap, and the floating toolbar can be enabled independently. The editor status reports line and character totals; the app adds cursor line/column, selected character count, detected type, encoding, and line-ending style.
Floating toolbar
The toolbar combines the copy menu, live search, Go to Line, and More Actions. Up to three tools you repeatedly use can become adaptive quick buttons. On narrow windows those learned buttons are hidden to keep the core controls on one row; all tools remain in More Actions or the Command Palette.
Command Palette
Press Ctrl+Shift+P and type part of an action name. The palette only lists actions that are valid for the current document, making it the fastest way to find less-visible functions such as Security Scan.
Extension workflows
Automatic activation
The extension examines the resource URL and response content type. Supported raw documents are enhanced automatically; ordinary web pages are not. Disabling a type in Settings affects newly opened resources.
Launcher and local files
The launcher can open a supported file by picker or drag-and-drop without broad file access. It can also start the Editor, HTTP Client, JavaScript Playground, Regex Playground, or Data Converter. If the current tab is not a supported source, tools start with a sample. Launcher files are limited to 10 MiB and support UTF-8, UTF-16 LE/BE BOMs, strict UTF-8, then Windows-1252 fallback.
Persisted and shareable state
For the same resource, CodePrettify can restore search text, highlighted line, folds, scroll position, and display settings without changing the URL. Share Configuration URL explicitly encodes selected viewer configuration in the hash for an HTTP/HTTPS resource; it does not include the resource body.
What’s New
After a release with substantial new functionality, the extension can show the changes since the last version you used. Never show again stores that preference locally. Small maintenance releases do not need their own announcement.
Files, tabs, Paste & Prettify, and saving
Tabs and sessions
Open several files in native tabs. Opening the same path reuses its tab. Close with the tab button, middle-click, or Ctrl+W; closing the final tab returns to the open-file landing surface. The app keeps up to ten recent files, integrates with Windows Recent Documents, and can restore the previous window, tabs, and active tab when session restore is enabled.
Paste & Prettify
Press Ctrl+N, paste code/data/log text, and either keep Auto-detect or choose a type. Detection checks JSON, JSON Lines, tolerant JSONC, HTML/XML, fenced Markdown, high-confidence JavaScript, TOML, CSS, YAML, CSV, and Markdown/plain text. The dialog accepts up to 16 MiB; larger clipboard content should be saved and opened as a file so large-file safeguards can be used.
Save and Save As
- Raw/Source saves the original source. Prettified/Rendered/Table saves the document representation, never the viewer’s interface HTML.
- If another program changed the disk file, choose Overwrite, Save As, or Cancel.
- Saving formatted JSONC warns that comments and trailing commas will be removed; No is the default.
- The app preserves the original encoding/BOM when possible. Unsaved, comparison, and native large-file tabs use Save As.
External changes
A file watcher detects changes made outside CodePrettify and offers/reloads current content as appropriate. This is separate from the app’s session recovery.
Formatting and validation by file type
JSON / JSONC / JSON Lines
JSONC accepts comments and trailing commas, not JSON5 single quotes or unquoted keys. Formatted JSONC omits comments. JSON Lines validates and formats each nonblank physical line independently. Validation identifies syntax location and warns about unsafe integers or key-order risk.
JavaScript / TypeScript
The bundled beautifier adds readable indentation. Folding recognizes functions, classes, blocks, arrays, and objects while avoiding strings/comments. Bracket matching is optional. Safe HTTP(S) URLs and resolvable relative imports become clickable; bare package names are not guessed.
YAML
Formatting deliberately normalizes newlines instead of re-dumping the document, which could lose comments, anchors, scalar styles, whitespace meaning, or numeric precision. Multi-document YAML is validated. There is no misleading minified copy.
TOML
Parsed TOML can be canonically reserialized, except source containing sub-millisecond temporal precision is kept unchanged to avoid truncation. “Minified” TOML is canonical serialization without comments/blank lines, not a compact grammar.
Markdown
Rendered mode supports links, task lists, footnotes, selected emoji shortcodes, and heading anchors. Raw HTML is escaped, dangerous schemes are blocked, and remote images become inert links/placeholders so viewing a document makes no automatic image request. Minification only collapses safe repeated blank lines.
CSS
Formatting/minification respects strings, comments, functions, data URLs, and calculations. Validation detects unclosed strings/comments, unmatched delimiters, and malformed declarations. HTTP(S) URLs/imports can be clicked. Color swatches open a picker with adjusted and copyable HEX/RGB/HSL values.
XML / RSS / Atom
Strict parsing reports line/column. Formatting avoids mixed content, preserved whitespace, internal DTD subsets, and quoted markup where a rewrite could change data. “Minification” is byte-preserving because whitespace-only text nodes may matter. Folding, safe links, timestamps, and encoded-value hints remain available.
CSV and HTML (app)
CSV detects comma, semicolon, or tab delimiters with quote-aware parsing and provides Table plus source. HTML formatting preserves raw script/style/pre text, escapes rendering safely, supports folding, and can make safe URLs clickable.
JSON helpers and JSON Path Inspector
Structured JSON adds folding, clickable URLs, human-readable Unix/ISO timestamp hints, and hover/click decoding for likely JWT or Base64 strings. Enable the hover breadcrumb to see the path under the pointer; enable the click inspector to open JSON Path from a value.
Run a JSON Path query
- Open JSON Path Inspector from More Actions, the Command Palette/Tools menu, a breadcrumb, or a JSON value click.
- Start with
$. Use dot properties, quoted bracket properties, numeric indexes, or[*]. Autocomplete suggests keys. - Run the query. Copy the current path or a compact JSON/display value, or select a result to jump to its source line.
Scope: the inspector intentionally does not implement filters, slices, recursive descent, or script expressions. It renders at most 200 results and autocomplete shows at most 50 keys.
Table View
Table View is available for compatible JSON arrays of objects and repeating XML/RSS structures; the app also uses it for CSV. Mixed JSON arrays are rejected rather than silently dropping primitive rows.
- Search the entire table or filter individual columns.
- Click a column to sort; drag columns to reorder them.
- Expand long cells and optionally show column summaries such as dominant type, unique values, and empty counts.
- Select rows (or all rows) and export the selection as CSV or JSON. Export the current filtered/sorted table as HTML.
- Large tables use virtual rendering from roughly 1,000 rows so the modal remains responsive.
CSV export: JSON must be a nonempty top-level array of flat objects; nested arrays/objects are not flattened. XML/RSS needs a repeating structured element.
JSON Schema Validator
- Open a normal JSON or JSONC document (JSON Lines is not supported).
- Open JSON Schema Validator, paste a schema, and choose Validate or press Ctrl+Enter.
- Inspect each violation’s instance path, keyword, message, schema path, and source line. Select a result to jump.
Core types, enum/const, numeric/string/object/array constraints, composition, conditionals, dependencies, safe regular expressions, and common formats are supported. Validation is completely local.
Limits: schema input is capped at 2 MiB, with depth 80, 100 reported errors, 100,000 validation operations, and about 2.5 seconds. Only local # references/anchors are resolved; remote schemas are never downloaded. unevaluatedProperties is reported as unsupported.
Statistics, Diagnostics, and Security Scan
Statistics
All formats report original/formatted/minified estimates, lines, characters, and characters without whitespace. JSON adds structure depth and value counts; JavaScript adds declarations/modules/comments; CSS adds rule/property/variable/import/color counts; XML/feed adds element, attribute, namespace, text, comment, and CDATA counts.
Diagnostics
Diagnostics combines syntax status with long-line, large-document, and mixed-indentation warnings. Depending on format it can identify duplicate JSON keys, JSONC, suspicious timestamps/URLs, embedded JWT/Base64/URL values, pagination/GraphQL/OpenAPI/schema shapes, feed issues, JavaScript/CSS summaries, HTTP response context in the extension, and practical quick-fix guidance.
Security Scan
Run Security Scan from the Command Palette (or Tools in the app). It looks locally for likely cloud/API keys, tokens, private-key blocks, credential-bearing URLs, connection strings, API routes, paths, and file references. Findings are masked, severity-sorted, and linked to source; Copy endpoints copies only the endpoint list.
Important: this is heuristic assistance, not a security guarantee. It may produce false positives and false negatives. A scan examines at most 5,000,000 characters and reports at most 1,000 findings; partial results are clearly marked.
Data Converter
Open Data Converter from More Actions, the Command Palette, Tools, or the extension launcher. Use document loads the active text. Choose an operation and press the Convert button beside it. Reverse moves the output into input and selects the inverse. Copy and Download sit together beside output.
| Operation | What it does |
|---|---|
| Prettify JSON | Parses valid JSON and writes readable indentation. |
| Minify JSON | Parses valid JSON and removes insignificant whitespace. |
| Stringify JSON | Turns a JSON value into a JSON string literal. |
| Parse JSON | Turns a JSON string literal back into its contained JSON value. |
| Escape JSON | Escapes quotes, slashes, controls, and special characters for JSON text. |
| Unescape JSON | Decodes valid JSON escape sequences to characters. |
| JSON → XML | Maps JSON types into a namespace-aware XML representation. |
| XML → JSON | Uses an ordered $xml model to preserve attributes, namespaces, text, CDATA, comments, processing instructions, and order. |
| JSON → CSV | Converts a flat array of objects to comma-separated rows. |
| CSV → JSON | Parses a compatible delimited table into an array of objects. |
| JSON → YAML | Serializes compatible JSON values as YAML. |
| YAML → JSON | Parses YAML values and serializes them as JSON. |
| JSON → TSV | Converts a flat array of objects to tab-separated rows. |
| TSV → JSON | Parses a compatible tab-separated table into objects. |
| Base64 Encode | Encodes UTF-8 text as standard Base64. |
| Base64 Decode | Validates Base64 and decodes it as UTF-8 text. |
| URL Encode | Percent-encodes text for safe use in a URL component. |
| URL Decode | Decodes valid percent-encoded text. |
Compatibility and safety
Operations proven incompatible with the current input are disabled with a reason; other choices remain selectable. JSON conversion refuses unsafe integers, -0, out-of-range values, and decimals that JavaScript would silently change. CSV/TSV requires flat tabular data and protects spreadsheet-formula-leading text. YAML conversion cannot preserve comments, anchors, tags, or scalar styling.
Limits: 10 Mi characters input, 32 Mi characters output, plus bounded YAML nodes/depth. Base64 decode must produce valid UTF-8.
Copy and Export
Copy
The floating copy menu and app Edit menu offer Original, Formatted, and Minified when valid. Feedback explicitly identifies what was copied and the preferred copy method is remembered. YAML hides Minified because there is no safe equivalent.
Export
- Download Original, Formatted, or Minified source.
- Export compatible structured data as CSV or the active table as HTML.
- Convert compatible JSON/YAML/TOML during download; unavailable choices show a reason. XML/feed tabular projection is best-effort and can be lossy.
- Export code as a PNG using visible viewport/full code, line-number, wrap, and resolution choices. Large images use constrained/segmented paths to stay within canvas limits.
The Windows app’s Save writes to disk; Export creates a separate representation. In the extension, export always downloads a new file.
Compare
Compare with Clipboard
- Open Compare or press Ctrl+Alt+D.
- Paste/type the second document. Choose Semantic mode when offered or Text mode for exact line changes.
- Use Previous/Next Difference and Swap Sides. Text mode can ignore whitespace and synchronizes panes.
Semantic comparison supports JSON/JSONC/JSON Lines/YAML/TOML where parsing succeeds. It ignores formatting and object-key order. Arrays with unique id, _id, uuid, or guid values are matched by identity; other arrays are positional. Extremely large change sets are capped and invalid inputs fall back to text.
Compare files (app)
The Windows app can browse two files, prefill the current file, remember the pair, and open a dedicated comparison tab. Selecting exactly two supported files in Explorer can expose the Compare command.
JavaScript Playground
- Open a JavaScript, JSON, or JSON Lines document and start the Playground. You can also start it from the extension launcher.
- Write scratch code. Optionally include the current document. JSON/JSON Lines becomes
const json. - For JavaScript choose Safe definitions to expose callable/passive top-level declarations without page startup, or Run entire file to include startup logic.
- Choose a 1, 5, or 15-second timeout and Run, or press Ctrl+Enter.
- Inspect console output,
console.table, errors with mapped lines, duration, and the final expression’s value. Top-levelawaitis supported.
window, document, page libraries, extension APIs, require, fs, process, local-file access, fetch, XHR, WebSocket, or other network channel. Browser- or Node-dependent files are expected to fail; isolate a pure function or use Safe definitions.Inspect Runtime
Inspect Runtime executes the current JavaScript in the same timeout-controlled sandbox and groups top-level variables, functions, and classes. It captures parameter signatures, bounded values, source previews, console output, and declaration line links. Partial results remain useful if later startup code throws.
Choose inline-value display to add captured values beside source lines and hover details. Use Clear inline values to remove annotations. Runtime Inspect has the same no-DOM, no-Node, no-local-files, and no-network restrictions as the Playground.
Regex Playground
- Choose Current document or Custom text. Custom text is session-only; document mode highlights matches in the viewer and can jump to them.
- Enter the pattern without surrounding slashes. Toggle global
g, ignore casei, multilinem, dot-alls, Unicodeu, or stickyy. - Review every match, line/column, and numbered/named capture group. The right side always shows the complete
/pattern/flagsform with Copy Regex. - Open Advanced for replacement preview (
$1and$<name>), named saved patterns, last-ten history, and up to 20 test assertions: match, no match, count equals, or replacement equals. - Copy generated JavaScript, C#, or PowerShell snippets, or load an example from the guide.
Safety: patterns run only in a worker, time out after roughly 1.5 seconds, and stop after 500 matches. This prevents a catastrophic expression from freezing the viewer.
HTTP Client
Build a request
- Choose GET, POST, PUT, PATCH, DELETE, HEAD, or OPTIONS; enter an HTTP/HTTPS URL and timeout.
- Add query parameters, headers, and authentication: None, Bearer, Basic, or API key in a header/query.
- For a body choose None, JSON, raw text, URL-encoded form, multipart fields, or GraphQL with variables.
- Use
{{variable}}from an environment. Secret fields are masked in the UI. - Press Send. This is the moment the browser/app makes the external request. Send becomes Cancel while active.
Reuse and share safely
Save requests, collections, environments, and sanitized history. Import cURL or CodePrettify JSON; export JSON. Generate copyable cURL, fetch(), or PowerShell. Export warns when authentication/secrets would be written in plain text.
Inspect the response
Review formatted Body, Raw, Headers, Cookies, status, duration/timing, size, and content type. Copy/save content or open recognized JSON, JSON Lines, YAML, CSS, HTML, XML, JavaScript, or TypeScript in a viewer tab where supported.
Limits and behavior: URL credentials are rejected, cache is disabled, redirects are followed, and bodies are capped at 50 MiB with truncation reported. The browser extension is also subject to browser CORS/credential policy. A timeout of 0 disables timeout; maximum differs by product (five minutes in the extension, ten in the app).
Local storage is bounded: the extension allows up to 500 collection entries, 50 environments, and 200 variables per environment; the app uses 100 entries, 20 environments, and 50 variables per environment. History is capped and strips/redacts credentials, sensitive headers/query values, request bodies, and unsafe error text before replay data is stored.
Settings
Appearance
Auto/Light/Dark theme and 10–24px editor font. Auto follows the operating system.
Editor
Line numbers, word wrap, minimap, floating toolbar, and two- or four-space indentation.
Language
Auto plus English, Danish, German, Spanish, French, Italian, Japanese, Korean, Norwegian, Portuguese, Russian, Swedish, Vietnamese, and Chinese.
Per-format
Enable/default view (extension), JSON breadcrumb/click inspector/folding, JS folding/bracket matching, CSS color picker, and XML/RSS folding/clickable URLs. The app also has HTML folding/URLs.
App startup
Restore the previous session. Desktop settings apply to every open/new tab and remain local to the app.
Extension settings apply immediately and are stored through browser storage; app settings are local. They are not synchronized between products.
Large files, encoding, and line endings
Native large-file mode
Files of 64 MiB or more use a read-only native pager instead of loading the full WebView document. Generic pages contain about 750,000 characters; CSV pages contain 500 rows with a synchronized raw view. Previous/Next, page search, forward cross-page search with progress/cancel/wrap, and Go to line/row remain available. Most WebView tools are disabled and Save becomes Save As of the original.
Encoding
The app detects UTF-8/BOM, UTF-16 LE/BE, UTF-32 BOM, BOM-less UTF-16 heuristics, strict UTF-8, then Windows legacy fallback. Click encoding in the status bar to reopen as Auto, UTF-8, UTF-8 BOM, UTF-16 LE/BE, Windows-1252, or ISO-8859-1.
Line endings
The status bar shows Windows (CRLF) or Unix (LF). Click it to convert the open document when size permits. This is a deliberate document change and should be saved if you want it on disk.
Explorer integration and runtime requirements
The packaged x64/Arm64 app is .NET 10 self-contained, so the main app does not require a separate .NET desktop runtime. It does require the shared Microsoft Edge WebView2 Evergreen runtime; if missing, the recovery screen opens Microsoft’s installer and provides Retry.
File associations and Explorer commands can open supported files, and selecting exactly two supported files can offer Compare. This optional Explorer handler is framework-dependent and may require matching Microsoft.NETCore.App 10.x. Use Help > Explorer Integration Runtime to check/install the official prerequisite, then restart Explorer or sign out if the shell has not refreshed.
Keyboard shortcuts
| Action | Shortcut | Availability |
|---|---|---|
| Toggle Prettified/Raw or Rendered/Source | Ctrl+B | Both |
| Copy active/default representation | Ctrl+Alt+C | Both |
| Find | Ctrl+F | Both |
| Go to Line | Ctrl+G | Both |
| Toggle floating toolbar | Ctrl+Alt+T | Both |
| Compare with Clipboard | Ctrl+Alt+D | Both |
| JavaScript Playground | Ctrl+Alt+P | Both |
| Inspect Runtime | Ctrl+Alt+I | Both, JavaScript |
| Regex Playground | Ctrl+Alt+R | Both |
| Command Palette | Ctrl+Shift+P | Both |
| Run Playground/schema action | Ctrl+Enter | When shown |
| Paste & Prettify | Ctrl+N | App |
| Open | Ctrl+O | App |
| Save / Save As | Ctrl+S / Ctrl+Shift+S | App |
| Close tab | Ctrl+W | App |
| Next tab | Ctrl+Tab or Ctrl+Page Down | App |
| Previous tab | Ctrl+Shift+Tab or Ctrl+Page Up | App |
Privacy and security
- Formatting, validation, conversion, statistics, search, comparison, schema checks, security scanning, and playground/regex processing stay on the device.
- The HTTP Client is the intentional network exception: the request is sent directly to the displayed target only after you press Send. CodePrettify does not proxy it.
- Playground and Runtime Inspect use an isolated worker with no page DOM, extension API, local-file, Node, or network capability.
- Markdown suppresses automatic remote image loading. Remote JSON Schema references are never fetched.
- HTTP environments and saved authentication are local but not encrypted as a secrets vault. Treat exported HTTP JSON as sensitive because it may contain plaintext secrets.
- Extension host permissions allow CodePrettify to recognize supported resources; they do not upload documents.
For the complete policy and marketplace disclosures, read the Privacy Policy.
Troubleshooting
The extension did not activate
Confirm the file type is enabled, reload the raw resource, and check that it is a supported raw document rather than an HTML page. For direct local URLs, enable Allow access to file URLs; alternatively use the launcher picker.
Formatting failed or looks unchanged
Open the validation alert and jump to its line/column. Some formats intentionally preserve text when reserialization could change meaning: YAML, mixed-content XML, and high-precision TOML are common examples.
A tool is missing or disabled
Tools are format- and view-sensitive. Open More Actions/Command Palette, switch from Raw/native view to Prettified, and verify the current data shape. The extension’s Document Navigator is intentionally limited to JSON and XML/RSS.
The JavaScript file needs document, fs, or fetch
That code cannot run in the secure worker. Use Safe definitions and call a pure function, paste an isolated function into the scratchpad, or test it in its intended browser/Node environment.
An HTTP request fails
Verify resolved variables, authentication placement, URL, timeout, and response size. The extension remains subject to browser CORS and credential restrictions. Use generated cURL/PowerShell to compare outside the browser.
A conversion option is disabled
The compatibility check has proven the current input is unsuitable. Read the reason: common causes are invalid JSON, nested data for CSV/TSV, unsafe JSON numbers, invalid UTF-8 Base64, or a lossy YAML/XML construct.
The Windows app will not show its viewer
The main package includes .NET 10, but Microsoft Edge WebView2 Evergreen is required. Use the recovery screen to install WebView2 and Retry. Explorer integration is optional and may separately require Microsoft.NETCore.App 10.x.
