Indent API
Indent, dedent and convert tabs to spaces on plain text, line by line. The indent endpoint prefixes every line with a fixed indentation — a number of spaces or tabs, or any custom prefix like "> " for quoting — and can optionally indent blank lines too. The dedent endpoint removes the longest common leading whitespace from a block (the same idea as Python textwrap.dedent), so you can flatten an over-indented snippet and get back exactly which prefix was stripped. The tabs endpoint converts between tabs and spaces honouring tab stops — expand tabs to spaces or collapse runs of spaces back to tabs, at a chosen tab size, leading whitespace only or throughout. It works on any text without parsing it as code, and CRLF line endings are preserved. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 4 endpoints. It only touches whitespace structure: to trim or sort lines use a lines API, to reflow long lines use a word-wrap API, and to reformat real source code use a code-formatter API.
api.oanor.com/indent-api