Overline text generator — put a bar over letters and digits

Type a letter, a digit or a whole word and the tool draws a bar above each character, the notation for a sample mean (x̅), a logical NOT (A̅) or a repeating decimal.

Live demo · real result from this tool
Keeps the line continuous across word gaps.

Styled text

H̅e̅l̅l̅o̅ ̅w̅o̅r̅l̅d̅ ̅2̅0̅2̅6̅

Processed on your device — nothing is uploaded.

How to use the overline text generator

  1. Type the character or text you want barred into Your text.
  2. Keep Also mark spaces ticked for one continuous bar, or untick it to bar each word separately.
  3. Press Copy under Styled text and paste it into your note or message.

What it does and when to use it

The overline is mostly a notation mark. Statistics students write x̅ for a sample mean. Logic and electronics use A̅ for “not A”. Repeating decimals put a bar over the digits that repeat. Physics and engineering use it for averages and complex conjugates (z̅). In plain text, there is no easy way to type any of these, so this tool builds them for you.

It also works as decoration: a line above a name in a profile or a title in a chat. For a line under the text, use the underline text generator or the stronger double underline. For small raised characters such as exponents, the superscript generator is the right tool.

How it works

The tool splits your text into visible characters and appends U+0305 COMBINING OVERLINE, from the Combining Diacritical Marks block, after each one. Combining marks take no space; the font draws the bar above the character before it, and bars on neighbouring characters touch. Spaces are marked only while Also mark spaces is ticked. Line breaks are never marked.

Worked examples

From the tool’s own function:

  • x → x̅, the sample-mean symbol.
  • NOT A with Also mark spaces unticked → N̅O̅T̅ A̅, two separate bars.
  • AB + CD with the default settings → A̅B̅ ̅+̅ ̅C̅D̅. The bar runs over the whole expression, which in logic means NOT(AB + CD). To bar only one term, convert it on its own and paste it in.

Limits and tips

  • Height varies. Over capitals and tall letters such as d, the bar can collide with the letter or float at a different height than over x or a, depending on the font.
  • Accessibility. A screen reader often reads x̅ as just “x”, losing the meaning, or as “x combining overline”. Search will not find barred words. In anything people must understand, write “x-bar” or “the mean” in words too.
  • Limits fill faster, since every bar is a character.
  • Your text is processed in the browser; nothing is uploaded.

Frequently asked questions

How do I type x-bar for statistics?
Type x, copy the result x̅, and paste it into your text. The same works for y-bar, starting from y. To work out the mean itself, use the mean, median and mode calculator.
How do I show a repeating decimal such as 0.333…?
Convert only the repeating digit, here 3, and paste the result after "0." to get 0.3̅. If you convert "0.3" as a whole, the bar covers the zero and the point as well.
Why does the bar join up across a word?
The tool uses U+0305, a combining overline that is meant to connect with its neighbours. The similar macron (U+0304) is shorter and leaves gaps; this tool does not use it.
What does a bar over a letter mean in electronics?
It means NOT, or "active low". A signal written R̅E̅S̅E̅T̅ is active when the wire is at 0. The Boolean algebra simplifier accepts NOT, !, ~, ¬ or a trailing ' instead, since bars are hard to type.
Will maths software understand x̅?
Usually not. Spreadsheets, calculators and programming languages see a letter followed by a mark, not a variable called x-bar. Use it in messages and notes, not in formulas.

Written by the ToolsRift team · Last updated

Pages are drafted with AI assistance and checked by automated tests. How we write and check pages.

Was this tool useful?

Report a problem

Start typing to search every tool.

↑ ↓ to moveEnter to openEsc to close