EditSafely

Convert Unary Base to Integers

Convert base one (a run of tally symbols) to integers. Runs entirely in your browser, so your data never leaves your device.

0 chars · 0 lines

Output

The result appears here as you type.

Options

How to use Convert Unary Base to Integers

  1. 1. Paste the unary strings. Enter one or more runs of a repeated tally symbol, one per line. Each run's length is what the tool will count.
  2. 2. Set the unary symbol. Type the character used as the tally mark into Unary symbol so the tool knows exactly what to count, such as a repeated 1 or a custom mark.
  3. 3. Copy the resulting integers. Copy the decimal count for each run, for example 11111 becoming 5, and paste it wherever the plain numeric value is needed instead of the tally form.

When to use Convert Unary Base to Integers

Convert Unary Base to Integers counts the length of a run of repeated tally symbols and returns it as an ordinary decimal integer. Convert Unary Base to Integers reverses the unary encoding used in teaching, esoteric formats and tally-style counters.

  • Grading a unary conversion exercise. A lesson on number bases has students convert decimal values to unary tally marks by hand. Check their work by converting the tally strings back to decimal.
  • Reading output from an esoteric programming language. Some minimal or esoteric languages represent numbers as runs of a single repeated symbol. Convert the raw output back into a readable decimal integer here.
  • Counting marks from a manual tally system. A count kept as a series of tally marks, whether on paper or transcribed as text, needs converting into a plain number for a report or spreadsheet.
  • Verifying a unary encoder you built. You wrote code that converts decimal numbers to unary and want to confirm the round trip, checking that converting the tally output back gives the original number.

Examples

Unary to integer

Input

11111

Output

5

Negative unary

Input

-111

Output

-3

About the Convert Unary Base to Integers tool

Convert Unary Base to Integers is a free online tool that works entirely inside your web browser. Convert base one (a run of tally symbols) to integers. Because the processing happens on your own device, nothing you enter is uploaded, logged or stored anywhere.

This page is one of 133 Integer utilities on EditSafely. Each one does a single job well, and all of them follow the same rule: your input stays on your machine.

You can shape the output with the Unary symbol setting, and the result refreshes the moment you change it. 2 worked examples further down the page show exactly what the tool produces for real inputs.

Because nothing leaves your device, the tool is suitable for sensitive content such as internal documents, credentials or customer data. It also responds instantly, since every keystroke is handled on your own machine rather than by a remote API.

Frequently asked questions

Does Convert Unary Base to Integers cost anything?

Yes, it is completely free. All 2,658 tools on EditSafely work without an account, a subscription or usage limits.

Is it safe to paste sensitive or confidential data?

No data leaves your device. The whole tool is JavaScript that runs inside your browser tab, so there is no upload, no server-side processing and no log of what you did. If you disconnect from the internet after the page loads, it keeps working.

How much text can I process at once?

There is no fixed limit. Because the work happens on your own device rather than on a shared server, the practical ceiling is your machine's memory, which comfortably handles inputs far larger than typical online tools allow.

Do I need to sign up or install anything?

Nothing to install and no account needed. Open the page in any up-to-date browser, including on a phone or tablet, and the tool is ready.

How do I use the result?

The output panel has a one-click copy button, and you can keep refining the input while you work; the result updates in place as you type.