How do I format code on this page?
Paste code into the left editor or load a file, choose the options you need, and select Format. Review the result on the right, then copy or save it.
Format, validate, view, convert, and minify JSON or JSON5 in your browser. Select the accepted input syntax and desired output syntax separately, choose tabs or 2 to 4 spaces, and optionally sort object keys recursively. Syntax errors are shown in the output editor.
Choose JSON or JSON5 independently for the input and output. JSON5-to-JSON5 formatting preserves comments, while conversion, key sorting, and minification serialize the parsed data into the selected output syntax.
{name: "Alice"} instead of {"name": "Alice"});{'name': 'Bob'});{"a": 1, "b": 2,});Use JSON output for APIs and systems that require standard JSON. Use JSON5 output for developer-maintained configuration where comments, NaN, Infinity, and other JSON5 values need to remain valid.
Paste code into the left editor or load a file, choose the options you need, and select Format. Review the result on the right, then copy or save it.
The input must match the selected language or syntax. Check incomplete statements, unmatched brackets or quotes, and a dialect or mode that does not match the input, then format again.
A code formatter reads language-aware tokens and nested structures, then rewrites indentation, spacing, and line breaks according to a consistent rule set. It does not compile or run the program, so formatting is not a correctness or security check.
Use 2 spaces and standard JSON for APIs and configuration files. Select JSON5 only when comments or trailing commas are intentional, and sort keys only when key order is not meaningful to readers. Choose JSON or JSON5 independently for input and output, sort object keys, set indentation, open the structured view, or create minified output.
Format and beautify Java, Python, JavaScript, JSON, HTML and more; adjust indentation, spacing and line breaks.
Inspect, compare and validate JSON; test JSONPath expressions, or convert data to CSV, YAML and XML.
Open and edit CSV or Excel sheets, format tabular text, and convert CSV to Excel or SQL.
Write and preview Markdown, render Mermaid diagrams, and convert Markdown, HTML and tables between formats.
Compare passages, count words and keywords, sort or replace lines, and view DOCX text.
Convert between MP3, WAV, FLAC and more, play audio or raw PCM, and inspect or edit audio metadata.
Trim, join or split recordings, remove silence or noise, and adjust volume, speed, pitch or channels.
Transcribe audio to text, generate speech from text, or record your voice in the browser.
Convert and compress video, trim or join clips, resize frames, and extract audio.
Play local or streaming video, record your screen or camera, and use your camera as an online mirror.
Compress or merge PDFs, split and rearrange pages, convert pages to images, and view or compare documents.
Convert image formats, resize or crop photos, compress files, compare pictures, and extract text with OCR.
Capture and beautify screenshots, turn text into images or GIFs, draw on a whiteboard, and create word clouds or favicons.
Edit SRT or VTT captions with a video preview, shift timing, convert formats, and manage subtitle tracks.
Open ZIP, 7Z, RAR or TAR files, extract selected contents, and create new archives with optional ZIP/7Z passwords.
Encode and decode Base64 or Base32, escape URLs, HTML and Unicode text, and inspect JWT contents.
Convert number bases and values between binary, decimal and hex; turn numbers into words or text into binary.
Work out percentages and fractions, summarize statistics, and calculate grades, discounts or aspect ratios.
Show an online clock, run a countdown or stopwatch, and calculate dates, ages or time-zone differences.
Check your IP and IPv6 connection, inspect HTTP requests or HAR files, and calculate CIDR address ranges.
Convert length, weight, temperature, data storage and other units.
Convert HEX, RGB and HSL values, extract colors from an image, check contrast, or test your display with solid colors.
Generate and scan QR codes or barcodes, including QR codes for links and Wi-Fi networks.
Generate hashes, UUIDs and passwords, test regular expressions, create URL slugs and check file permissions.
Check screen resolution and refresh rate, measure with a screen ruler, test keys, or read from a teleprompter.
2048, Minesweeper, Sudoku, Gomoku, Tank Battle