Truncate String screenshot

Truncate String

Truncate text to a chosen length in your browser: cut at N characters and append an ellipsis, dots or nothing. Nothing is uploaded.

Privacy First
0 Runs
Updated 2026-11-06
No upload
Instant
No signup

What this truncate string does

The page cuts the text at the chosen length in characters — not bytes, so an emoji counts as one — and then appends the ellipsis you picked: the single character …, three dots, or nothing at all. A text that already fits is returned untouched, with no suffix added, so running the page twice changes nothing. A length at or below zero, a length that is not a whole number, and an ellipsis outside the three names are refused, because each would silently answer a different question.

How to use it

Truncate String: paste the text into the box above, set Maximum length (default "3") and Ellipsis (default "…"), and press Run to get the result below.

Worked example

Input:

abcdef

Output:

abc…

Why it runs in your browser

The conversion happens on this page with JavaScript. Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere. The page reads text and returns result; reloading the page discards both.

The page cuts the text at the chosen length in characters — not bytes, so an emoji counts as one — and then appends the ellipsis you picked: the single character …, three dots, or nothing at all. A text that already fits is returned untouched, with no suffix added, so running the page twice changes nothing. A length at or below zero, a length that is not a whole number, and an ellipsis outside the three names are refused, because each would silently answer a different question.

Truncate text to a chosen length in your browser: cut at N characters and append an ellipsis, dots or nothing. Nothing is uploaded.

How to use it

Truncate String: paste the text into the box above, set Maximum length (default "3") and Ellipsis (default "…"), and press Run to get the result below.

Why it runs in your browser

The conversion happens on this page with JavaScript. Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere. The page reads text and returns result; reloading the page discards both.

What to Expect

Best for

  • Converting text to result when the data is already on screen.

What this tool keeps

  • Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere.

Sample input

abcdef

Sample output

abc…

Frequently asked questions

How do I use the truncate string?

Truncate String: paste the text into the box above, set Maximum length (default "3") and Ellipsis (default "…"), and press Run to get the result below.

Is my input uploaded?

No. The text is parsed on this page with JavaScript and is never posted to a server.

Is there a size limit?

Yes: 5 MB per run. Larger input is refused with a message rather than freezing the tab.

Developer program

Build custom tools for your store

Join the SDK program to create useful ecommerce utilities for your store.