Favorite places of your favorite city
Home
Add to preferred sources on Google

JSON Formatter & Validator

Make a JSON document easier to read or remove unnecessary spacing. The tool checks syntax before producing output and preserves the original data tokens instead of rebuilding them from JavaScript values.

Syntax only; duplicate keys and original number text are preserved.

Processing takes place locally. The tool adds no uploads or history. Normal site services remain separate.

Limits and privacy

Input: up to 1 MiB (1,048,576 UTF-8 bytes); nesting: 64 containers; output: up to 8 MiB (8,388,608 UTF-8 bytes). Escaped unpaired surrogates are valid JSON syntax but may not be interoperable.

Format or minify JSON

  1. Paste JSON or import one UTF-8 text file. The input limit is 1 MiB and the maximum container nesting depth is 64.
  2. Choose two or four spaces and select Format, or select Minify to remove whitespace outside strings. Invalid input produces an error rather than a repaired document.
  3. Review the output, then copy it or download a JSON file. Editing the input or changing indentation clears the previous result until you process it again.

What changes and what stays the same

Formatting changes only whitespace outside strings. The formatter uses line feeds, indents nonempty objects and arrays, and puts one space after each object colon. Minifying removes the four whitespace characters allowed by JSON outside strings.

Numbers remain exactly as written. A large integer such as 9007199254740993 is not rounded, and forms such as 1e400, -0 and 1.2300 retain their original spelling. Receiving software may still impose its own numeric limits.

Object members stay in their original order. Repeated names also stay present: syntax validation does not mean that duplicate names are portable or desirable. Different applications can interpret repeated names differently.

Quoted strings and escape sequences remain unchanged. The tool does not sort keys, normalize Unicode, repair syntax, validate a schema or check whether an API will accept your data.

Formatting examples

The input {"ok":true,"items":[1,2]} can be expanded into indented lines without changing any keys, values or array positions. Empty objects and arrays remain compact.

Minifying { "note": "keep two spaces" } produces {"note":"keep two spaces"}. Spaces inside the string are part of its value and stay intact.

The input {"id":9007199254740993,"id":2} keeps both id members and the large integer exactly as written. The valid-syntax label does not certify that duplicate keys are safe for the receiving application.

Syntax validation has limits

Use strict JSON: double-quoted strings, no comments, no trailing commas and no NaN or Infinity literals. Any single top-level JSON value is allowed, including a string, number, boolean or null. JSON5 and multiple JSON Lines records are outside this tool.

Files must be UTF-8 without a byte-order mark. Input is limited to 1 MiB, nesting to 64 containers and output to 8 MiB. Escaped unpaired Unicode surrogates can pass JSON syntax while remaining problematic for other applications. Validation does not establish schema correctness, security or interoperability.

Local processing and sensitive content

The tool processes text locally without tool-added uploads, history or input-bearing links. Copy and download happen only on request. Normal site services remain separate; avoid pasting secrets into a page unless you trust the surrounding environment.

JSON formatting questions

The formatter preserves the original number token rather than serializing a parsed JavaScript number. Other programs that read the result may still round large integers or reject extreme exponents.

They can satisfy JSON syntax, but RFC 8259 recommends unique names because receiving implementations differ. This tool preserves duplicates and does not claim to check member-name uniqueness.

No. Only JSON whitespace outside strings is removed. Spaces and escape sequences inside strings are preserved.

No. It rejects these as invalid strict JSON. Correct the input deliberately rather than relying on an automatic repair that might change its meaning.

No. Syntax validation does not check a schema, required fields, value ranges, duplicate-name handling or the API’s business rules.

Sources

JSON to YAML

Convert JSON to YAML locally while preserving number text and quoted strings; copy or download the complete result.

Open tool — JSON to YAML

YAML to JSON

Convert one YAML document locally to JSON with exact number text and bounded aliases, then copy or download the complete result.

Open tool — YAML to JSON

HTML to Markdown

Convert pasted or local HTML into Markdown, review conversion notes, and copy or download the result.

Open tool — HTML to Markdown

JavaScript Regex Tester

Test a JavaScript pattern locally and inspect matches, captures, and UTF-16 positions.

Open tool — JavaScript Regex Tester

Markdown to HTML

Convert a Markdown draft to an HTML fragment, inspect the source and inert preview, then copy or download it.

Open tool — Markdown to HTML

Text Sorter

Sort lines alphabetically by a chosen language or by Unicode code point, keeping duplicates, blank rows and complete line contents.

Open tool — Text Sorter

Remove Duplicate Lines

Keep the first copy of each exact text line, preserving order, significant spaces and blank rows, then copy or download the result.

Open tool — Remove Duplicate Lines

Text Diff Checker

Compare two drafts locally, with exact whole-line changes, visible whitespace rules and clear final-newline handling.

Open tool — Text Diff Checker

Case Converter

Convert text to uppercase, lowercase, capitalized words or sentence case with explicit letter rules.

Open tool — Case Converter

HTML Entity Encoder/Decoder

Encode or decode literal HTML references with explicit context, Unicode options and LF output, without parsing or rendering markup.

Open tool — HTML Entity Encoder/Decoder

Markdown Table Generator

Edit a small literal-text table, set alignment and copy GFM Markdown or import tab-separated text.

Open tool — Markdown Table Generator

Query String Parser & Builder

Edit ordered URL parameters, retain repeated names and copy a normalized query or HTTP(S) URL.

Open tool — Query String Parser & Builder

URL Encoder & Decoder

Convert a UTF-8 URL component or form value with explicit space and plus rules, then copy or download the result.

Open tool — URL Encoder & Decoder

Base64 Encoder & Decoder

Encode UTF-8 text as standard or URL-safe Base64, or decode either format with clear errors and complete text output.

Open tool — Base64 Encoder & Decoder

XML Formatter

Check namespace-aware XML 1.0, format or compact locally, and copy or download UTF-8 output.

Open tool — XML Formatter

SMS Character Counter & Segment Calculator

See how your message is encoded, where its segments end and what it may cost. Your text stays in your browser.

Open tool — SMS Character Counter & Segment Calculator

Social Media Character Counter

Check platform-specific limits and split posts without losing text.

Open tool — Social Media Character Counter

Character Counter

Count characters, words, sentences and paragraphs. Check word density, reading time and UTF-8 size, all in your browser.

Open tool — Character Counter

Text Size Calculator

Compare text encodings and payload sizes in your browser.

Open tool — Text Size Calculator

PDF Text Cleaner

Fix line breaks and spacing in text copied from a PDF. Preserve your original and review ambiguous hyphens before copying the cleaned text.

Open tool — PDF Text Cleaner

Fancy Text Converter

Convert supported fancy Unicode letters to normal text locally. Keep case, accents, emoji and your original text.

Open tool — Fancy Text Converter

Garbled Text Fixer

Fix garbled text and repair broken accents with a browser-based mojibake fixer. Review each possible UTF-8 reversal before applying it.

Open tool — Garbled Text Fixer

Gmail Clipping Checker

Measure email HTML bytes in UTF-8, compare them with an advisory 102,000-byte Gmail reference, and inspect size contributors locally.

Open tool — Gmail Clipping Checker
View all tools in this category