Integer to Ordinal Converter

Converts a list of non-negative integers (one per line) into English ordinal strings, such as 1 -> "1st", 2 -> "2nd", 3 -> "3rd", 11 -> "11th", and 21 -> "21st", following standard English ordinal suffix rules. Negative numbers are rejected. A free online tool from Staaarter, right in your browser.

Runs locallyUpdated 2026-07-27

Overview

Introduction

English ordinal numbers (1st, 2nd, 3rd, 4th, ...) follow a simple but slightly irregular pattern based on a number's last one or two digits. This tool applies that pattern automatically to a whole list of integers.

It's useful anywhere you need to display ranked or ordered positions, like race results, list items, or dates, as ordinal text rather than plain numerals.

What Is Integer to Ordinal Converter?

A converter that takes a list of non-negative integers, one per line, and outputs each one's English ordinal string.

It correctly handles the special-case "teens" (11th, 12th, 13th) that don't follow the simple last-digit rule the way 21st, 22nd, and 23rd do.

How Integer to Ordinal Converter Works

For each integer, the tool checks whether its value modulo 100 falls between 11 and 13; if so, the suffix is always "th".

Otherwise, it looks at the number's last digit: 1 gives "st", 2 gives "nd", 3 gives "rd", and any other digit gives "th".

The chosen suffix is appended directly to the number to produce the final ordinal string.

When To Use Integer to Ordinal Converter

Use it when generating display text for rankings, positions, dates, or list items that should read naturally in English.

It's also handy for quickly checking the correct suffix for an unusual number like 111 or 113.

Features

Advantages

  • Correctly implements the full English ordinal rule set, including the 11th/12th/13th exceptions that a naive last-digit rule would get wrong.
  • Processes an entire list of numbers in one pass.

Limitations

  • Only produces English ordinal forms; other languages have entirely different ordinal rules and aren't supported.
  • Rejects negative numbers, since English has no standard ordinal form for them.

Examples

Simple ordinals

Input

1
2
3
4

Output

1st
2nd
3rd
4th

Teens exception

Input

11
12
13

Output

11th
12th
13th

Twenties (not an exception)

Input

21
22
23

Output

21st
22nd
23rd

Best Practices & Notes

Best Practices

  • Remember the teens exception applies based on the number modulo 100, so 111, 112, and 113 also get "th", not "st"/"nd"/"rd".

Developer Notes

The suffix logic checks `n % 100` against 11-13 first (the exception case) before falling back to a `switch` on `n % 10`, which is the standard, correct way to implement English ordinal suffixes without missing the teens exception.

Integer to Ordinal Converter Use Cases

  • Displaying ranked results (1st place, 2nd place, ...) in a UI or report
  • Formatting ordinal dates (the 3rd, the 21st) in generated text
  • Checking the correct ordinal suffix for an unusual or large number

Common Mistakes

  • Assuming the suffix only depends on the last digit, which incorrectly gives 11 the suffix "st" instead of the correct "th".
  • Trying to convert a negative number, which isn't supported since English has no standard negative ordinal form.

Tips

  • Use the companion Ordinal to Integer Converter to validate that an ordinal string you've seen elsewhere uses the correct suffix.

References

Frequently Asked Questions