Murelio

Loading the features you need.

Reverse Word Order

Reverse the sequence produced by splitting text into words and captured whitespace chunks.

How to use

  1. Enter a sentence and run the word-order reversal.

Capabilities and scope

Because whitespace chunks are included in the reversed array, the operation is a mechanical token-order reversal rather than linguistic reordering.

How it works

It uses input.split(/(\s+)/).reverse().join("").

Example

one two three becomes three two one.

Useful for

  • Experiment with reversed word order or list text

Before you use it

  • Grammar and punctuation meaning are not interpreted; whitespace chunks are simply reversed with the other pieces.

Frequently asked questions

Are line breaks preserved in place?

Line breaks are whitespace chunks and can move to mirrored positions.

Related tools