Reverse Word Order

Reverse Word Order lets you reverse whitespace-separated word order within each individual line. Enter your own values or load the worked example.

Method and calculation

Reverse whitespace-separated word order within each individual line.

Inputs and settings

Reverse Word Order accepts Input text.

Worked example

Reverse Word Order example — Input text: "Hello world\nA second line\nHello world". Computed output: world Hello line second A world Hello

Output and limitations

Sentence tokens are reversed within each row rather than across the whole document. Punctuation attached to a token travels with that token. The operation normalizes intervening whitespace to one space and is intended for text experiments rather than grammar correction.

Technical references: JavaScript Unicode normalization

Reverse Word Order FAQs

Reverse Word Order applies the following rule to your input: Reverse whitespace-separated word order within each individual line. The worked example on this page uses the same processor as the result button.
Reverse Word Order has these boundaries: Input is treated as plain text; it is never executed. Start by checking the input text field against the units or format shown.
Reverse Word Order provides this sample: world Hello line second A world Hello. Use the sample button to reproduce it, then replace the inputs with your own values.