Formatters
16 free toolsPretty-print, minify, and validate JSON, SQL, HTML, CSS, and YAML.
Formatters take messy or minified code and make it readable, or do the reverse before you ship it. The validators go further and point at the line and column of the first mistake with a plain-English hint: a trailing comma, a smart quote, a YAML value that quietly changes type. Use them when a config file will not load and the error message only says "unexpected token".
Everything here runs in your browser: files and text are processed locally and never uploaded.
All 16 tools
Markdown TOC Generator
Generate a table of contents from Markdown headings
JSON Prettify / Minify
Format, validate, and minify JSON
SQL Formatter
Prettify SQL queries
HTML Prettify / Minify
Format or compress HTML
CSS Prettify / Minify
Format or compress CSS
JavaScript Prettify / Minify
Format or compress JavaScript
XML Prettify / Minify
Format or compress XML
Markdown Preview
Live side-by-side Markdown editor and rendered preview
HTML Preview
Paste raw HTML and see it rendered in a sandboxed iframe
Markdown Table Generator
Build GitHub-flavored Markdown tables in a visual grid
Markdown → HTML Converter
Convert Markdown to clean HTML with live preview
Markdown → PDF Converter
Convert Markdown to a styled PDF document with customizable options
HTML → Markdown
Convert HTML into clean, readable Markdown
NDJSON / JSON Lines Formatter
Validate NDJSON line by line and convert between JSON Lines and JSON arrays
JSON Validator
Validate JSON syntax with line and column error locations
YAML Validator
Validate YAML syntax with line-numbered errors and lint warnings
Guides
From the blog: the mechanisms, standards, and edge cases behind these tools.
- JSON 'Unexpected Token' Errors: What Each Message Really Means Decode Chrome, Node, Firefox and Safari JSON.parse errors: trailing commas, single quotes, comments, BOMs, smart quotes, HTML pages, and what JSON.parse lets through. Sep 27, 2026 · uses JSON Prettify / Minify, NDJSON / JSON Lines Formatter, JSON Validator +1
- How GitHub Turns Headings Into Anchor Links (and Why Your TOC Links 404) There is no standard Markdown heading-anchor algorithm. GitHub strips punctuation and keeps the double hyphen in c--rust, markdown-it-anchor percent-encodes it, and the DOM id you see on GitHub has a user-content- prefix the href never mentions. Twelve headings run through five slugifiers, with real output, plus which of them our TOC generator matches, and where it deliberately does not. Sep 3, 2026 · uses Markdown TOC Generator, Markdown Preview, Markdown Table Generator +1
- CodeBeautify and JSONFormatter Leaked 80,000 Pastes. How to Format JSON Without Uploading It Researchers pulled cloud, database, and bank-client credentials from saved pastes on two JSON formatters. The leak was the Save feature, not the formatting. Oct 14, 2026 · uses JSON Prettify / Minify, YAML Validator
- The YAML Norway Problem and Other Values That Change Type Why NO becomes false, 0755 becomes 493 and 1:30 becomes 90 in YAML 1.1 parsers but not in YAML 1.2, with real output from PyYAML, Ruby Psych, and the yaml npm package. Sep 27, 2026 · uses JSON Validator, YAML Validator
- CSS Page Breaks: Why break-inside: avoid Is Not Working in Your PDF Why HTML-to-PDF output splits tables, images and headings mid-page, and how to control it: page-break-* vs break-*, why avoid silently fails, orphans, widows, @page and thead, with browser support checked against MDN data. Sep 23, 2026 · uses Markdown → HTML Converter, Markdown → PDF Converter
- XML to JSON Has No Canonical Mapping: Attributes, Repeats, and Lost Order XML and JSON have different data models, so every converter invents a convention: BadgerFish, Parker, GData and fast-xml-parser disagree on attributes, text nodes and repeats. Executed examples of the singleton-vs-array trap, mixed content, type coercion, and why element order cannot survive the trip. Sep 3, 2026 · uses JSON Prettify / Minify, HTML → Markdown
- NDJSON Is Not a JSON Array With Extra Newlines Newline-delimited JSON has three rules and three classic ways to break them: a UTF-8 BOM glued to the first token, CRLF line endings from Windows exports, and the blank-line question the two specs answer differently. The mechanics of each failure, and why per-line error isolation is the format's real selling point. Aug 20, 2026 · uses JSON Prettify / Minify, NDJSON / JSON Lines Formatter
- What an LLM API Call Actually Costs in October 2026 (GPT-6 vs Claude 5.5 vs Gemini 3.8) Per-call and per-1,000-call costs for GPT-6, Claude 5.5 and Gemini 3.8, worked out with real arithmetic, plus the billing traps that make naive estimates wrong. Oct 6, 2026 · uses JSON Prettify / Minify
- JSON to Go Struct: What the Converter Can't Know A JSON to Go struct converter sees one sample. Why it emits int64 for every whole number, interface{} for null, and never time.Time — and exactly what to fix. Sep 9, 2026 · uses JSON Prettify / Minify
- HTML Entities vs URL Encoding vs String Escaping: Which One Stops XSS There is no universal "sanitize" function. Each encoder neutralizes one parser and is inert or actively harmful in the next one over: HTML entities inside a script block corrupt data and a lone backslash still breaks out, an HTML-encoded onclick value is decoded before JavaScript ever sees it, and JSON.stringify leaves </script> intact. The OWASP context rule, demonstrated in Node. Sep 3, 2026 · uses HTML Preview
- JSON Diff Is Not Text Diff: Key Order, 1 vs 1.0, and What 'Changed' Means A line diff of two JSON documents reports changes that are not changes (key order, whitespace, 1 vs 1.0) and hides changes that are (1 vs "1", null vs missing). What RFC 8259 actually says, how a structural diff decides, where ours uses index matching instead of LCS, and JSON Patch as the machine-readable answer. Sep 3, 2026 · uses JSON Prettify / Minify
- JSONPath vs jq: One Selects, One Transforms JSONPath vs jq: one selects nodes, one is a transformation language. A syntax cheat sheet, RFC 9535's rules, and where implementations still disagree. Aug 25, 2026 · uses JSON Prettify / Minify