EditSafely

Splice a List

Modify a list in-place. Runs entirely in your browser, so your data never leaves your device.

0 chars · 0 lines

Output

The result appears here as you type.

Options

How to use Splice a List

  1. 1. Paste your list. Put one item per line into the input pane, such as an ordered list where a section in the middle needs to be replaced.
  2. 2. Set the Start position and Items to delete. Enter the 1-based Start position where the change begins, and how many Items to delete from that point, mirroring how splice works in most programming languages.
  3. 3. Enter Items to insert. Type any replacement items, one per line, into the Items to insert field. Leave it empty to only delete, or fill it to swap in new content at that position.
  4. 4. Copy the spliced list. Copy the result, with the named range removed and any new items inserted in its place, into the document where the updated list belongs.

When to use Splice a List

Splice a List lets you delete and insert items at a specific position in one operation, the same behavior as the splice method in JavaScript arrays. Reach for Splice a List whenever a middle section of a list needs to change without retyping the whole thing.

  • Swapping out a stale entry in a config-like list. A settings list has one outdated value in the second position that needs replacing. Set start position 2, delete 1, and insert the new value in its place.
  • Replacing a step in a set of instructions. One step in a numbered procedure changed after a process update. Splice out the old step at its position and insert the corrected wording without retyping the rest.
  • Removing a block of test data. A fixture file has three consecutive junk rows starting at a known line. Set the start position and delete count to three to drop just that block.
  • Inserting new items mid-list without appending. You need to add items in the middle of an ordered list, not at the end. Set delete to zero and provide the new items to insert at the chosen position.

Examples

Replace the second item with cherries (start 2, delete 1)

Input

apples
bananas
dates

Output

apples
cherries
dates

About the Splice a List tool

Splice a List is a free online tool that works entirely inside your web browser. Modify a list in-place. Because the processing happens on your own device, nothing you enter is uploaded, logged or stored anywhere.

This page is one of 114 List utilities on EditSafely. Each one does a single job well, and all of them follow the same rule: your input stays on your machine.

You can shape the output with 3 settings, including Start position (1-based), Items to delete and Items to insert (one per line), and the result refreshes the moment you change one. A worked example further down the page shows exactly what the tool produces for a real input.

Because nothing leaves your device, the tool is suitable for sensitive content such as internal documents, credentials or customer data. It also responds instantly, since every keystroke is handled on your own machine rather than by a remote API.

Frequently asked questions

Does Splice a List cost anything?

Yes, it is completely free. All 2,658 tools on EditSafely work without an account, a subscription or usage limits.

Is it safe to paste sensitive or confidential data?

No data leaves your device. The whole tool is JavaScript that runs inside your browser tab, so there is no upload, no server-side processing and no log of what you did. If you disconnect from the internet after the page loads, it keeps working.

How much text can I process at once?

There is no fixed limit. Because the work happens on your own device rather than on a shared server, the practical ceiling is your machine's memory, which comfortably handles inputs far larger than typical online tools allow.

Do I need to sign up or install anything?

Nothing to install and no account needed. Open the page in any up-to-date browser, including on a phone or tablet, and the tool is ready.

How do I use the result?

The output panel has a one-click copy button, and you can keep refining the input while you work; the result updates in place as you type.

Related tools

All List Tools