# Integer shortener

## World's simplest integer tool

This online utility truncates all integers in the input data and replaces the long integers with their short versions in-place. You can specify the exact number of digits that you want to keep in the output integers and select the truncation side (truncate from the beginning or end of the integer). Created by math nerds from team Browserling.

We put a browser in your browser!
Browserling

Check out our project Browserling – get a browser in your browser and browse while you browse.

A link to this tool, including input, options and all chained tools.

Can't convert.

Integer shortener tool
What is a integer shortener?

With this browser-based program, you can shorten multiple integers to the specified digit length. If the integers are mixed with text data, then there's no need to even extract them from the data. This app is able to directly truncate integers in the data. It will find all integers in the input data, remove a certain number of digits from them, and put them back in the same place where they were. The digits can be cut off from either side of the integers and the side can be switched in the options. In the integer length option, you specify the number of digits you want to get in the output integers. If you use the truncation mark option, you can enter one or more characters that will appear in place of the truncated digits as a prefix or postfix of the integer. Integerabulous!

Integer shortener examples
Click to use

Truncate a List of Integers

In this example, we enter a column vector of round integers of different magnitudes and we want to truncate all these values to thousands. To do this, we set the length of digits to 4 and switch on the "Truncate the End" mode. This mode removes as many zeros as necessary from the right side of each integer to obtain integers with length of four digits.

1000000
200000
30000000
40000
500000000
60000000
700000
8000000
90000000

1000
2000
3000
4000
5000
6000
7000
8000
9000

**Required options**

Drop digits from the
right side of an integer.

Truncate the integer to this
number of digits.

Counting TV Show Votes

In this example, we're analyzing the voting data of a musical TV show. The counting of votes was incremental, starting from the counter value 000000000. At the end of the show, there weren't that many votes and many of the zeros remained at the beginning of the counter. In all the results, the voting information takes the last five digits, so to remove the unnecessary zeros, we truncate the integers from the beginning so that only the last five digits remain.

Singer #1: 000012345 votes
Singer #2: 000015676 votes
Singer #3: 000013494 votes
Singer #4: 000017487 votes
Singer #5: 000015839 votes

Singer #1: 12345 votes
Singer #2: 15676 votes
Singer #3: 13494 votes
Singer #4: 17487 votes
Singer #5: 15839 votes

**Required options**

Drop digits from the
left side of an integer.

Truncate the integer to this
number of digits.

Hide Wi-Fi Passwords

In this example, we paste a list of Wi-Fi names together with their passwords, which happen to be all integers. We don't really want to publish the full passwords, so to quickly mask the last digits of the passwords, we use the truncation algorithm of this utility. It modifies the integer data in-place, meaning that the text remains unchanged but only integers get modified. We feel like publishing just the first six digits of the passwords is safe, so we cut off the trailing part of the integers and mask the truncated digits with asterisks.

Wi-Fi Name Password
Bob Cafe 123456789
Robot Cafe 010101010
Good House 24680462
Zombieland 99999999
Spider-Man 666666666
Fun burger 224464422
Mr Nobody 00000000
Dragon force 353353353

Wi-Fi Name Password
Bob Cafe 123456***
Robot Cafe 010101***
Good House 246804***
Zombieland 999999***
Spider-Man 666666***
Fun burger 224464***
Mr Nobody 000000***
Dragon force 353353***

**Required options**

Drop digits from the
right side of an integer.

Truncate the integer to this
number of digits.

The characters entered here
will appear in place of the
truncated integer digits.

Pro tips
Master online integer tools

You can pass input to this tool via

__?input__query argument and it will automatically compute output. Here's how to type it in your browser's address bar. Click to try!
https://onlineintegertools.com/truncate-integers

__?input__=1000000%0A200000%0A30000000%0A40000%0A500000000%0A60000000%0A700000%0A8000000%0A90000000&truncate-right=true&length=4&use-postfix=false
All integer tools

Quickly rewrite integer digits using pretty Unicode glyphs.

Quickly generate random two-dimensional integer points.

Quickly generate random three-dimensional integer points.

Quickly print a list of integers that are palindromes.

Quickly convert the given integer to a palindromic integer.

Quickly find all integers in the given text or string.

Quickly make integer digits go in a triangle wave.

Quickly unleash the destructive force of Zalgo on integers.

Quickly find two or more integers that add up to the given integer.

Quickly find several integers that multiply up to the given integer.

Quickly randomize the given sequence of integers.

Quickly mix the order of digits in an integer.

Quickly put integers in increasing or decreasing order.

Quickly sort the individual digits of an integer.

Quickly increase all integers by a certain amount.

Quickly increase individual digits by a certain amount.

Quickly decrease all integers by a certain amount.

Quickly decrease individual digits by a certain amount.

Quickly randomly select an integer from a list of integers.

Quickly create groups from the digits of an integer.

Quickly write integer digits backwards.

Quickly remove one or more digits from an integer.

Quickly replace one or more digits in an integer.

Quickly drop digits from an integer and make it shorter.

Quickly add the thousands separator to integers.

Quickly remove the thousands separator from integers.

Quickly find the largest integer in a list of integers.

Quickly find the smallest integer in a list of integers.

Quickly find the total sum of a bunch of integers.

Quickly find the sum of all the digits in an integer.

Quickly find the total product of a bunch of integers.

Quickly find the product of all the digits in an integer.

Quickly calculate the partial sum of a bunch of integers.

Quickly calculate the partial product of a bunch of integers.

Quickly flip the sign of one or more integers.

Quickly split an integer into chunks of a given length.

Quickly merge partial integers together to form a larger integer.

Quickly round integers up or down to the required precision.

Quickly convert integers to a downloadable picture.

Quickly generate a list of von Neumann ordinals.

Quickly generate a list of Zermelo ordinals.

Quickly generate an ordered sequence of integers.

Quickly generate an ordered list of even integers.

Quickly generate an ordered list of odd integers.

Quickly write an integer spelling in words.

Quickly convert spelled integers to regular integers with digits.

Quickly generate an array of integers for programming.

Quickly find the number of occurrences of digits in integers.

Coming soon
These integer tools are on the way

Draw von Neumann Universe

Create a drawing that visualizes von Neumann hierarchy of sets.

Create Integer n-Tuples

Generate a list of tuples of integers with n elements.

Convert Integers to Unary Base

Quickly convert integers to base one.

Convert Unary Base to Integers

Quickly convert base one to integers.

Convert Integers to Binary Base

Quickly convert integers to base two.

Convert Binary Base to Integers

Quickly convert base two to integers.

Convert Integers to Octal Base

Quickly convert integers to base eight.

Convert Octal Base to Integers

Quickly convert base eight to integers.

Convert Integers to Hex Base

Quickly convert integers to base sixteen.

Convert Hex Base to Integers

Quickly convert base sixteen to integers.

Convert Integers to Base64

Quickly encode integers to base-64.

Convert Base64 to Integers

Quickly decode base-64 to integers.

Change Integer Base

Quickly convert integers to a custom base.

Convert Integers to HTML Entities

Quickly encode integers to HTML encoding.

Convert HTML Entities to Integers

Quickly decode HTML entities to integers.

Convert Integers to URL Encoding

Quickly encode integers to URL (percent) encoding.

Convert URL Encoding to Integers

Quickly decode URL-encoded integers.

Create Random Integers

Generate a list of random integers.

Check if an Integer is Symmetric

Check if the given integers are palindromes.

Generate an Integer Matrix

Create a matrix whose entries are all integers.

Generate an Integer Vector

Create a vector with integer coefficients.

Find the Average

Quickly calculate the average value of integers.

Find the Digit Average

Quickly calculate the average value of integer digits.

Clamp Integers

Limit integer values to a range.

Clamp Integer Digits

Limit integer digit values to a range.

Duplicate Integers

Create multiple copies of the input integers.

Rotate Integers

Rotate the digits of an integer to the left or right.

Shift Integer Digits

Move the digits of an integer to the left or right.

Subtract Integers

Quickly find the difference of a bunch of integers.

AND Integers

Quickly apply the bitwise AND operation to integers.

OR Integers

Quickly apply the bitwise OR operation to integers.

XOR Integers

Quickly apply the bitwise XOR operation to integers.

NOT Integers

Quickly apply the bitwise NOT operation to integers.

NAND Integers

Quickly apply the bitwise NAND operation to integers.

NOR Integers

Quickly apply the bitwise NOR operation to integers.

XNOR Integers

Quickly apply the bitwise NXOR operation to integers.

Convert an Integer to Ordinal

Add -st, -nd, -rd, -th suffixes to integers to make them ordinals.

Convert an Oridinal to Integer

Remove -st, -nd, -rd, -th suffixes from ordinals to make them ints.

Filter Integers

Find integers that match a filter (greater, less, equal).

Left-pad Integers

Add padding to integers on the left side.

Right-pad Integers

Add padding to integers on the right side.

Right-align Integers

Position all integers so that they align on the right.

Center Integers

Position all integers so that they align in the middle.

Take Absolute Value of Integers

Turn all integers into positive integers.

Make All Integers Negative

Turn all integers into negative integers.

Convert Integers to Fractions

Rewrite an integer in fractional form.

Convert Fractions to Integers

Extract the numerator and denominator from a fraction.

Find and Replace Integers

Search for all occurrences of an integer and replace it.

Generate Integers from a Regex

Create integers that match the given regular expression.

Generate Small Integers

Create relatively tiny integers.

Generate Big Integers

Create relatively huge integers.

Color Integers

Add color to integers based on a condition.

Color Integer Digits

Add color to individual digits in the given integers.

Find Patterns in Integers

Find hidden patterns of numbers in integers.

Subscribe!
Never miss an update

Cool!

Notifications
We'll let you know when we add this tool

Cool!