Security

HSTS Max-Age Converter

Convert HSTS max-age values between seconds and longer time units for easier policy review.

Last reviewed: April 30, 2026Free toolMethodology

HSTS Max-Age Converter

These fields start with sample inputs. Keep them or replace them, then run the tool to show a fresh result.

Number fields accept plain values and common formatted input such as 250000, 250,000, or 1,234.56.

Result

Calculating the sample result.

Why it matters

HSTS directives are stored in seconds, but security reviews often reason about them in months or years.

When to use

  • Reviewing or updating HSTS policy headers
  • Checking whether a max-age value matches a compliance requirement
  • Explaining policy duration to non-security stakeholders

Inputs & Outputs

Inputs

  • Max-age value is the HSTS duration.
  • Input unit defines whether the value starts in seconds, days, months, or years.

Outputs

  • Converted durations show the same HSTS policy window in multiple units.
  • Header-ready seconds give the value that belongs in the actual HSTS directive.

Max-age conversion method

The tool normalizes the selected duration into seconds and then displays equivalent durations in larger units for planning.

HSTS max-age is expressed as seconds in the header

Worked example

1

Policy translation

A security engineer wants to confirm that one year equals 31,536,000 seconds for an HSTS header.

Inputs

  • Value: 1
  • Input unit: years

Steps

  • Convert the policy duration into seconds
  • Render equivalent durations

Result

  • The output shows the exact header-ready max-age value.

Edge cases & caveats

  • This calculator helps with duration translation, not policy suitability.
  • Long HSTS durations should be deployed carefully because rollback is not instant once browsers cache the policy.

Frequently Asked Questions

Why do HSTS values use seconds?

Because the header specification defines max-age numerically in seconds.

Is one year the same as 365 days here?

Yes. This converter uses fixed-duration arithmetic for operational simplicity.

Keep going