Skip to tool
FeuTex · free tools runs in-browser no bloat built by LiMiT

Spring Cron Formatter

Paste a Spring cron expression to normalize whitespace, validate field count (6 fields, optional 7th year), and get a compact explanation of each field. If you paste a 5-field cron, you can auto-add the seconds field (0).

Category: Developer · URL: /tools/spring-cron-formatter.html
Input (Spring cron)
Expected: 6 fields (sec min hour dom month dow), optional 7th (year). Example: 0 0/5 * * * ?
Output
Normalized cron + quick explanation. No network calls; runs fully in your browser.
Privacy: runs locally in your browser. No uploads, no tracking scripts.

How to use

Use it in seconds:

  1. Paste your cron into the input (Spring usually uses 6 fields: sec min hour dom month dow).
  2. Pick options (auto-add seconds for 5-field crons, uppercase names, output style).
  3. Click Format and copy the normalized result.
Keywords this page targets (natural cluster): spring cron formatter, spring cron expression formatter, format spring cron, spring cron validator, spring cron normalize, spring cron pretty print, spring cron 6 fields, spring cron 7 fields year, convert 5 field cron to spring, spring cron explain fields, spring cron day of week ?, spring cron L W #, spring cron MON-FRI, spring cron every 5 minutes, spring cron seconds field, spring CronTrigger expression, spring CronExpression syntax, spring scheduled cron format, spring @Scheduled cron formatter, spring cron examples
Secondary intents covered: Normalize a cron string to a single-space, one-line format, Validate whether an expression is Spring-compatible (field count and characters), Convert a standard 5-field cron into Spring format by adding seconds, Pretty-print cron fields with labels for copy/paste reviews, Quickly understand what each cron field is doing (*, ?, /, -, ,), Uppercase month/day names (jan → JAN, mon-fri → MON-FRI), Spot common mistakes like wrong number of fields or invalid characters, Generate a clean cron to paste into @Scheduled(cron=...)

FAQ

How many fields does a Spring cron expression use?

Spring commonly uses 6 fields: second minute hour day-of-month month day-of-week. Some setups also accept an optional 7th year field.

What does the question mark (?) mean in Spring cron?

? means “no specific value” and is typically used in either day-of-month or day-of-week to avoid conflicts.

Can I paste a normal 5-field Linux cron here?

Yes—enable “Auto-add seconds” and it will prepend 0 as the seconds field to produce a Spring-style cron.

Does this tool calculate next run times?

No. It formats, validates, and explains the expression without doing heavy scheduling simulation.

Are month/day names supported (JAN, MON-FRI)?

Yes. Turn on “Uppercase month/day names” to normalize tokens like janJAN and mon-friMON-FRI.

Why do I see both * and ? used in examples?

* means “every value”, while ? means “not specified”. In many Spring/Quartz-style crons, ? is used in either DOM or DOW.

Will this tool reject all invalid cron expressions?

It checks field count and flags invalid characters, but it stays permissive on complex cron semantics. Always validate against your runtime (Spring version / scheduler) before deploying.