Recto
Markdown tools that never upload your document
Code viewer and formatter
Highlight, format, validate

Your code

Drop to open
Everything runs in this tab. Your code is never uploaded.
Ln 1, Col 1

Code viewer and JSON formatter, in your browser

Open any source file with syntax highlighting and line numbers. Format, minify and validate JSON, HTML, XML and CSS. Copy code into a document with its colours. Nothing is uploaded.

Most online JSON formatters and code beautifiers send what you paste to their server. That is a poor trade for an API response carrying an access token, a configuration file with a password in it, or code that isn't public yet. Everything here — highlighting, formatting, checking — runs in the page.

Format, minify, validate

What each format supports
FormatFormatMinifyCheck
JSONYesYesLine and column, with what was expected
HTMLYesYes—
XML and SVGYesYesWell-formedness
CSSYesYes—
SQLYes——

The formatters are careful in ways that matter. JSON numbers keep their exact digits, so a long ID or a precise decimal is never rounded. HTML formatting leaves the inside of <pre>, <script> and <textarea> exactly as it was, and keeps inline tags inline. CSS minification keeps the spaces calc() needs. Each was checked against an independent parser — Python's json, lxml and tinycss2 — on hundreds of real files.

Highlighting for 25 languages

JavaScript, TypeScript, Python, Java, C, C++, C#, Go, Rust, Ruby, PHP, Swift, Kotlin, SQL, shell, PowerShell, YAML, TOML, CSS, HTML, XML, Markdown, Dockerfiles, diffs and more. The language is worked out from the file name, a #! line or the code itself. You can edit in place: Tab indents, Enter keeps the indentation, Ctrl+G jumps to a line, and Ctrl+Z undoes a format.

Code in documents and slides

Copy with colours puts the highlighted code on the clipboard as formatted text, so it pastes into Word, Google Docs, PowerPoint or an email with its colours intact. Print gives a clean listing with line numbers, ready to save as PDF. For code inside a talk, Recto's slide maker highlights fenced code blocks too.

Questions

How do I format JSON?

Paste the JSON and press Format. Choose two spaces, four or tabs, and tick Sort keys to put every object's keys in alphabetical order. Numbers keep their exact digits, so nothing is rounded on the way through.

Why is my JSON invalid?

The checker names the line and column of the first problem and what it expected there — a missing comma, a trailing comma, single quotes, an unclosed string. Press Show me to jump to it. Tick Allow comments for files such as VS Code settings, which permit comments and trailing commas.

Is my code uploaded?

No. Highlighting, formatting and checking all happen in the page, in your browser. That makes it safe for API responses with tokens in them, configuration files and unreleased code.

Which languages are highlighted?

JavaScript, TypeScript, JSON, Python, Ruby, Java, Kotlin, C, C++, C#, Go, Rust, Swift, PHP, shell, PowerShell, SQL, YAML, TOML and INI, CSS, HTML and XML, Markdown, diffs, Dockerfiles, Lua and R. The language is picked from the file name or the code itself, and you can change it.

How do I paste code into Word or PowerPoint with colours?

Press Copy with colours. The code goes on the clipboard as formatted text with the colours written into it, so it keeps its highlighting when pasted into Word, Google Docs, PowerPoint, Keynote or an email.

Can it handle large files?

Yes. A three-megabyte file opens, highlighted, in under two seconds on a typical laptop, and long files are drawn a screenful at a time so scrolling stays smooth. Above four megabytes the text is shown without colours so the page stays quick.

Can I print code with line numbers?

Yes. Press Print to get the code with highlighting and line numbers, wrapped to the page, or choose Save as PDF in the print dialog.

The other tools

Markdown reader and editor

Open a .md file and read it typeset, or write with source and page side by side, both editable. Tables, task lists, footnotes, find and replace, six colour schemes.

Open the editor →

Document converter

Markdown, Word, EPUB, HTML and plain text, in any direction. Build an ebook or a Word file without handing your document to anyone.

Open the converter →

Book formatter

Turn a manuscript into a typeset book: real pages at your trim size, running heads, a contents page with page numbers, and a print-ready PDF or EPUB.

Format a book →

Markdown to slides

Write a talk in Markdown, split slides with a rule, and present full screen with speaker notes, or save the deck as a PDF or a single HTML file.

Make slides →

Document compare

See exactly what changed between two versions of a document, word by word, as a redline. Works with Markdown, Word, EPUB and plain text.

Compare documents →

Readability checker

Reading grade, Flesch score and five more measures, with long sentences, passive voice and padding highlighted in your own text.

Check readability →

Table editor

Paste CSV, a spreadsheet range or a Markdown table, edit it as a grid, and copy it out as Markdown, CSV, HTML or JSON. Opens .xlsx files too.

Edit a table →

CV typesetter

Write your CV in Markdown and get a clean, print-ready A4 or Letter page in one of four styles, with a fit-to-one-page control.

Typeset a CV →