★LocalHost Run Under Construction
  • Home
  • Articles
  • Tools
http://localhost
HomeArticlesTools
All tools›List Tools›Truncate

Truncate

World's simplest browser-based utility for truncating lists. Input your list and specify the maximum number of items to keep. Perfect for data processing, list management, or limiting content length.

Input List

​

Truncated List

​

Tool options

Split Options

Split by Symbol

Split by Regular Expression

​

Separator to split the list

​

Separator to join the truncated list

Truncation Options

​

Number of items to keep

Keep items from the beginning

Keep items from the end

List Truncation

This tool allows you to truncate a list to a specific number of items. You can choose to keep items from the beginning or the end of the list, and specify custom separators for splitting and joining. It's useful for limiting the size of lists, creating previews, or extracting specific portions of data.


Truncate Examples

Click to try!

Keep first 3 items in a list

This example shows how to keep only the first 3 items in a comma-separated list.

​
​

Split Options

Split by Symbol

Split by Regular Expression

​

Separator to split the list

​

Separator to join the truncated list

Truncation Options

​

Number of items to keep

Keep items from the beginning

Keep items from the end

Keep last 2 items in a list

This example shows how to keep only the last 2 items in a comma-separated list.

​
​

Split Options

Split by Symbol

Split by Regular Expression

​

Separator to split the list

​

Separator to join the truncated list

Truncation Options

​

Number of items to keep

Keep items from the beginning

Keep items from the end

Truncate a list with custom separators

This example shows how to truncate a list with custom separators.

​
​

Split Options

Split by Symbol

Split by Regular Expression

​

Separator to split the list

​

Separator to join the truncated list

Truncation Options

​

Number of items to keep

Keep items from the beginning

Keep items from the end


All List Tools


  • Sort — Sort list items in specified order
  • Unwrap — Unwrap list items from structured format
  • Reverse — Quickly reverse a list
  • Find unique — Find unique items in a list
  • Find most popular — Find most frequently occurring items
  • Chunk List — Split a list into fixed-size chunks
  • Wrap — Wrap list items with specified criteria
  • Rotate — Rotate list items by specified positions
  • Shuffle — Randomize the order of list items
  • Duplicate — Duplicate list items with specified criteria

LocalHost Run · Contact · Privacy Policy · Terms of Use

© 2026 LocalHost Run · localhost guides, articles, and developer tools · localhostrun.com
Visitors: 1025Best viewed in Netscape Navigator · 800×600© LocalHost Run