Ruby / Lua / Perl Formatter
Reindent Ruby, Lua, or Perl source. One tool, three keyword-driven languages.
How to use
- 1 Pick the language: Ruby, Lua, or Perl.
- 2 Paste source code.
- 3 Tune indent size — 2 spaces is idiomatic for Ruby, 2 or 4 for Lua and Perl.
- 4 Copy or download the result.
Why use this tool
- One tool covers three syntactically similar block-end-keyword languages.
- Per-language openers: <code class="rounded bg-slate-100 px-1 text-xs dark:bg-slate-800">do/end</code> for Ruby, <code class="rounded bg-slate-100 px-1 text-xs dark:bg-slate-800">function/end</code> for Lua, braces for Perl.
- Pure client-side — your code never leaves the browser.
- For canonical output use RuboCop (Ruby), StyLua (Lua), or perltidy (Perl) locally.
Frequently asked questions
Is this RuboCop-compatible?
No — this is a reindenter only. RuboCop applies hundreds of style cops; we apply indent rules based on block-opening keywords.
Does it understand here-docs and string interpolation?
Indent is computed line-by-line, so here-doc bodies may receive an extra leading space. For files heavy in here-docs, run the language-specific formatter.
Why is one tool for three languages?
Block structure is similar — single keyword opens, <code class="rounded bg-slate-100 px-1 text-xs dark:bg-slate-800">end</code> or <code class="rounded bg-slate-100 px-1 text-xs dark:bg-slate-800">}</code> closes. One rule engine, three keyword sets.
Ruby / Lua / Perl Formatter is a free developer utility by Zerethon Tools. Reindent Ruby, Lua, or Perl source. One tool, three keyword-driven languages. Runs entirely in the browser — no signup, no upload.
- Category
- Developer
- Pricing
- Free
- Privacy
- Browser-based
- Signup
- Not required
Privacy
Your data never leaves your browser unless explicitly stated. Ruby / Lua / Perl Formatter runs entirely client-side — no server upload, no logging, no tracking of your input.
Related tools
JSON Formatter
Format, validate, and minify JSON online. Free, no signup — your data never leaves your browser.
Open toolSQL Formatter
Format SQL queries online — beautify MySQL, PostgreSQL, SQLite, SQL Server, Oracle, and BigQuery.
Open toolUUID Generator
Generate UUIDs online — v1, v4, v7, and Nil. Bulk generation up to 10,000. Free, no signup.
Open toolPassword Generator
Generate strong, cryptographically random passwords. Configurable length and character sets — runs in your browser.
Open toolBuild, share, and grow on Zerethon Social
Free signup. Earn points, collect achievements, and connect with creators worldwide.