Skip to content
UniKit

List character keeper

Keep only the characters at the chosen positions of every line and drop the rest — 1-based positions, comma lists and 3-5 ranges, counted from the left or the right, measured in Unicode code points and joined in ascending position order.

Runs in your browserEvery computation happens in your browser — your data never leaves this device.

List

Result

One item per line, ordered by position, ready to copy.

Paste a list and positions to keep characters in bulk

Lines: 0 · Changed: 0 · Characters removed: 0

What this tool does

  • Pull the meaningful positions out of fixed-width codes, e.g. the letter prefix and the check digit of an order id.
  • Extract chosen positions from phone numbers or document ids for rule checks or masked previews.
  • One position list (1,3,5-8) works for rows of different lengths — out-of-range positions are ignored.

Example

Input

apple
banana

Output

ap
bn

Keeping positions 1 and 3 turns apple into ap and banana into bn.

Frequently asked questions

Are positions 1-based or 0-based?

1-based. 0 or a negative value is rejected; a range like 3-5 means positions 3, 4 and 5 and must not run backwards, otherwise it reports an error instead of returning nothing.

Is the output ordered by position or by the original line?

By ascending position. Even if you type 5,1,3 the result is position 1 then 3 then 5, so the same position list behaves identically on every line.

What if a position is beyond the line length?

It is ignored, so a short line simply yields a shorter result — no padding and no error. If every position is out of range the line becomes empty and is dropped as a blank line by default.

How are Chinese characters counted?

One Chinese character is one position and one emoji is one position, because counting walks Unicode code points. Composite emoji such as skin-tone variants occupy several positions.

Keywords:保留字符批量保留keep charactersextract chars按位置保留取指定位置list keep字符提取

Related tools