テキストと文書ツール

Truncate テキスト

「Truncate テキスト」はテキストと文書に使えるブラウザツールです。入力内容と結果は通常この端末内で処理され、登録は必要ありません。

ブラウザ内で処理登録不要プライバシーの説明 ↗

Maximum 100,000 characters. Per-line mode supports up to 50,000 lines and preserves empty and trailing lines.

A whole number from 0 to 100,000, including the optional indicator.

Added only when a processed value exceeds the maximum.

使い方

使い方

  1. Enter up to 100,000 characters and choose complete-text or per-line processing.
  2. Choose which side to keep, the maximum displayed-grapheme or code-point length, and an optional indicator.
  3. Truncate only values that exceed the maximum, then copy the result or download a text file.

The maximum includes the indicator

Keep beginning removes content from the right and places the indicator at the end. Keep ending removes content from the left and places the indicator at the beginning. The indicator consumes part of the selected maximum, so its unit count cannot exceed that maximum. Values already within the limit remain exactly unchanged and receive no indicator. A maximum of zero produces an empty result when no non-empty indicator is selected.

Unicode units and line scope are explicit

Displayed-grapheme mode uses browser Unicode segmentation so combining sequences, flags, emoji modifiers, and joined emoji normally stay intact. Code-point mode counts every Unicode scalar value separately and can split a displayed sequence. Complete-text mode counts LF line breaks as units. Per-line mode keeps line order, normalizes CRLF and CR to LF, and truncates each line independently, including empty and trailing lines. Input is limited to 100,000 UTF-16 characters, per-line mode to 50,000 lines, and output to 500,000 UTF-16 characters.

よくある質問

あわせて知りたいこと

Is the indicator added when the text already fits?

No. A value whose selected-unit length is at or below the maximum is returned unchanged.

Does the indicator count toward the maximum?

Yes. With a maximum of 20 and a three-dot indicator, at most 17 source units remain.

Will emoji stay together?

Usually in displayed-grapheme mode. Code-point mode intentionally counts and can separate the underlying Unicode components.