Text Tool

Spaces to Tabs

Spaces to Tabs helps clean or transform pasted text quickly in the browser. Use it online on EasyTools99.

Tool area

Everything runs in the browser.

Reference results

InputResult
item item
column valuecolumn value
nested nested
venue: Leeds venue: Leeds
room: 3 room: 3
title: Evening course title: Evening course

How it works

The tool converts each run of two, three or four ordinary spaces into a tab. It repeats the rule for longer runs, taking four spaces first. A single space survives, and existing tabs stay in place. The rule applies throughout a line, so it works best on text with consistent separators and needs review when extra spaces are used solely for alignment.

Worked examples

  1. An editor receives a list indented by two spaces per item. She converts the indentation and opens the result in an editor that displays invisible characters. The check tells her whether the list is suitable for the team’s tab-based template.
  2. An assistant copies two columns separated by four spaces. He imports the result using tabs as field boundaries and checks descriptions with double spaces, which could have created a third field unexpectedly.
  3. A developer tests a line whose indent is eight spaces. After seeing two tabs in the result, she opens the file with the project’s editor settings and checks how deeply the line is indented before saving the file.

Common mistakes

  • A tab does not always display at the width of four spaces. Check the receiving program’s tab stops.
  • A run in the middle of a description changes just like a leading indent. Check the number of fields when importing rows.
  • Five consecutive spaces give one tab followed by a space. Mixed indentation can leave this kind of remainder.

FAQ

Can I set a different group size here?

The rule uses groups of two to four spaces. Set the display width of the tabs in the program where you read the output.

Does the arrow in the table appear as a literal character?

The chart marks invisible tabs with an arrow. The tool returns the tab character itself.

Does the transformation remove line breaks?

The line breaks remain. The rule applies only to runs of ordinary spaces.

Related tools

Browse all text tools

Related guides

Next tool Tabs to Spaces