Spaces to Tabs

Replace groups of spaces with tab characters.

Each N spaces (1–8) become one tab. Inverse of Tab to Space. Does not indent empty lines specially; leftover spaces stay.

What Spaces to Tabs does

Each N spaces (1–8) become one tab. Inverse of Tab to Space. Does not indent empty lines specially; leftover spaces stay.

Practical limit for Spaces to Tabs: N spaces (1–8) become one tab. Leftover spaces remain. Max 200,000 characters. That is why output can differ from heavy desktop Text software. Read the tool-specific note again: Each N spaces (1–8) become one tab. Inverse of Tab to Space. Does not indent empty lines specially; leftover spaces stay.

How to use Spaces to Tabs

  1. Keep this tab on Spaces to Tabs (/space-to-tab). Pasting into the wrong Text tool (for example Tabs to Spaces) changes the job.
  2. Paste or type the input Spaces to Tabs expects. Path hint: space to tab. Replace groups of spaces with tab characters.
  3. Apply the Spaces to Tabs action only. Indent Lines is a different transform (Indent lines with spaces or tabs.). Each N spaces (1–8) become one tab. Inverse of Tab to Space. Does not indent empty lines specially; leftover spaces stay.
  4. Copy the output of Spaces to Tabs if you need it elsewhere. Size/complexity still follows: N spaces (1–8) become one tab. Leftover spaces remain. Max 200,000 characters.
  5. If the text job is actually Replace tabs with spaces., leave Spaces to Tabs and open Tabs to Spaces.

When not to use Spaces to Tabs

Skip Spaces to Tabs when a neighbor tool matches better — start with Tabs to Spaces or Indent Lines — or when the description already warns the job will fail. In the tool’s own words: Each N spaces (1–8) become one tab. Inverse of Tab to Space. Does not indent empty lines specially; leftover spaces stay.

Questions about Spaces to Tabs

What does Spaces to Tabs do that other Text pages on this site do not?
Each N spaces (1–8) become one tab. Inverse of Tab to Space. Does not indent empty lines specially; leftover spaces stay. Short version: Replace groups of spaces with tab characters.
Does Spaces to Tabs upload my file or text to Tool-You servers?
No. Spaces to Tabs runs in this browser tab. Files stay on the device. Limit note: N spaces (1–8) become one tab. Leftover spaces remain. Max 200,000 characters.
Should I use Tabs to Spaces instead of Spaces to Tabs?
Use Spaces to Tabs when you need Replace groups of spaces with tab characters. Use Tabs to Spaces when you need Replace tabs with spaces. They share a category (Text) but not the same job.
What are the limits of Spaces to Tabs?
N spaces (1–8) become one tab. Leftover spaces remain. Max 200,000 characters. Also: Each N spaces (1–8) become one tab. Inverse of Tab to Space. Does not indent empty lines specially; leftover spaces stay.