HMRC Authentication Code: Sign-In and Recovery Guide

By Saif Hayat, ACCA22 September 20267 min readLast updated
A small business owner signing in to HMRC online services on a laptop while a one-time access code arrives on a mobile phone

An HMRC authentication code is the one-time access code you use when signing in to HM Revenue and Customs (HMRC) with Government Gateway. If your code is not arriving or goes to an old phone number, enter your user ID and password, then select ‘You can get help’ when asked for the code. Follow that recovery route to change how you receive it.

A missing access code, forgotten sign-in details and a locked account need different fixes. Use the section below that matches your problem.

What your HMRC authentication code does

HMRC calls this an access code. It adds a security check after your Government Gateway user ID and password. You receive it by text message or voice call, or generate it through an authenticator app.

This extra check is called multi-factor authentication (MFA). It helps protect your account if someone obtains your sign-in details. It is an extra layer of protection, rather than a guarantee that an account can never be compromised.

Your password is something you know. The access code comes from a phone or authenticator app you can access. When HMRC asks for that code, your user ID and password alone are not enough.

Check which service you are using before searching for a missing code. This guide covers HMRC tax account access. If the screen names Companies House, use help for that service instead. Do not assume that instructions for an HMRC access code also apply to another government service.

Use the right sign-in details first

Small business owner checking her smartphone while typing on a laptop at a bright home office desk, an everyday secure sign-in moment.

HMRC online services support Government Gateway and GOV.UK One Login. Government Gateway uses a user ID and password. GOV.UK One Login uses an email address and password.

If you already use HMRC online services, continue with your existing details. Having GOV.UK One Login for another government service does not mean you should abandon the Government Gateway account you use for your business taxes. Existing GOV.UK One Login details for HMRC personal tax services can continue to be used for those services.

For your business tax account, HMRC says to use the details you used when you first registered a business tax. Start from the official HMRC sign-in page.

If you have never used HMRC online services, select ‘Create new sign in details’. The service will guide you to create Government Gateway or GOV.UK One Login details, even if you already have One Login for another service. Our guide explains how to create a Government Gateway account where that is the route HMRC provides.

Choose how to receive your access code

HMRC lists text message, voice call and authenticator app as the available access-code methods. Choose with your working conditions in mind. A text is less useful if your stockroom has no mobile signal.

MethodHow it worksPractical limitation
Text messageThe code is sent to your phone.You need mobile signal to receive it.
Voice callA voice reads the code during a call to a mobile or landline.HMRC says this is unsuitable for switchboards.
Authenticator appAn app generates the code on a phone, tablet or computer.You need access to the device and the app set up for the account.

HMRC's agent guidance explains that an authenticator app can produce codes offline and does not need mobile signal. It recommends a reputable authenticator app as the primary method for agents, with an additional method set up as a backup after signing in.

That backup recommendation comes from guidance for agent accounts. Do not assume every personal or business account has the same settings screens. Follow the options shown in your own account.

Access codes expire

In its access-code guidance for agents, HMRC says text message and voice call codes last for 15 minutes. An authenticator app displays an access code for 30 seconds before generating another.

Keep those timings separate from account recovery. A code expiring is not the same problem as losing access to the phone that receives it. When an app code changes, use the current code shown for the account you are signing into.

Recover access when your code does not arrive

HMRC provides a route for changing how you receive an access code, including when you have changed your phone number. You start with your existing Government Gateway details.

  1. Sign in with your Government Gateway user ID and password.
  2. When asked for an access code, select ‘You can get help’.
  3. Follow the steps to change how you receive your code.
  4. Confirm your identity if HMRC asks you to do so.

These are the steps in HMRC's help with signing in. They are the starting point for a lost phone, an old number or trouble receiving a code.

If you need further help, explain where sign-in stops: whether you have forgotten your details, cannot receive the access code or see an account-lock message.

Recover a forgotten user ID or password

If you have lost your Government Gateway user ID or password, HMRC says you can recover or reset your details when you try to sign in. Follow the instructions there.

This is separate from access-code recovery. The ‘You can get help’ route described above starts after you have entered your user ID and password. If you cannot get that far, start by recovering the missing sign-in details.

For an existing seller account, recovery is the sensible first step before considering a new account. HMRC's guidance tells existing users to continue using their existing details. Its account-creation instructions are for people who have never used HMRC online services.

A locked account needs time to unlock

HMRC says entering the wrong sign-in details too many times will lock your account. It unlocks after 2 hours, and helpdesk advisers cannot unlock it for you.

Do not confuse that temporary lock with a missing access code. If you know you have forgotten your password, use recovery instructions rather than continuing to guess. If the account is already locked, allow the stated period before trying again.

HMRC also notes that online services can be slow at busy times. Its sign-in guidance links to service status information, so check for a wider issue if the service itself is not responding.

Your accountant's access is managed separately

HMRC provides dedicated accounts for tax agents. The account an accountant needs depends on the tax service being used. Your own business tax account also lets you add, view or change a tax agent.

In its agent guidance, HMRC says an account without an existing MFA option will prompt the user to set one up at sign-in. If an option is already configured, the user must sign in using that method first. Once signed in, they can update it or add another option.

Those are instructions for the accountant's agent account. An online seller recovering their own access should use the Government Gateway help route above, rather than looking for agent administration menus.

Once you regain access, your business tax account can show your position for registered taxes, secure messages and contact details. It also provides sign-in and security preferences. For value added tax (VAT) access specifically, see our HMRC VAT login guide.

Get further help through HMRC

If the sign-in instructions do not resolve the problem, HMRC's digital assistant can help with using its online services. If it cannot help, you can ask to transfer to an adviser through webchat, subject to availability.

The sign-in help page also provides routes for VAT online services, other technical problems and GOV.UK One Login difficulties. Choose the route that matches your account. The Government Gateway recovery steps should not be treated as instructions for a One Login screen.

Frequently asked questions

Where do I find my HMRC authentication code?

Your HMRC access code comes by text message, voice call or an authenticator app, depending on the method set up for your account. It is requested after your Government Gateway user ID and password. If you cannot receive it, select ‘You can get help’ at the access-code prompt and follow the instructions.

How do I change the phone number for my HMRC access code?

Sign in with your Government Gateway user ID and password, then select ‘You can get help’ when asked for an access code. HMRC says this route lets you change how you receive codes, including after a phone number change. Follow the steps shown, and be prepared to confirm your identity if asked.

Can I get an HMRC access code without mobile signal?

An authenticator app can generate an access code without mobile signal and while offline, according to HMRC's agent guidance. It can work on a phone, tablet or computer. Text messages require mobile signal. HMRC also supports voice calls to landlines or mobiles, although it says switchboards are unsuitable for that method.

How long does an HMRC access code last?

HMRC's agent guidance says text message and voice call access codes last for 15 minutes. An authenticator app shows a code for 30 seconds before generating another. Use the current code for your account. If you cannot access the receiving phone or configured app, use sign-in help to change your access-code method.

How long will my Government Gateway account stay locked?

HMRC says an account locked after too many incorrect sign-in attempts unlocks after 2 hours. Helpdesk advisers cannot unlock it for you. A temporary lock is different from being unable to receive an access code. If you have forgotten your user ID or password, follow the recovery instructions when you try to sign in.

Should I use GOV.UK One Login instead of Government Gateway?

Continue using the sign-in details you already use for HMRC online services. Having GOV.UK One Login for another government service does not replace your existing Government Gateway details for HMRC. If you have never used HMRC online services, select ‘Create new sign in details’ and follow the route the service provides.

Free · 30 minutes · No obligation

Stop overpaying tax. Start filing in 5 days.

Thirty minutes with a qualified accountant. Most owners uncover £1,000-£3,000 in annual savings on the first call. If we are not the right fit, you walk away with a free tax review on the house.