If there’s anything we know about air travel, it’s that absolutely anything can happen. Being prepared can make the difference between missing a flight and being upgraded to a first class seat. Stay ready for anything with the WiFi codes you need to unlock the web, wherever you are.

Imagine being late, out of data, and far from your airline’s support desks when you realize that you forgot to screenshot the boarding pass you got when you checked into your flight online. Do you panic? No. You pull out the WiFi codes you saved, log on to the airport’s Internet server, and retrieve every file you need. You got this.

WiFi codes are just as useful in way less dramatic airport situations. Picture forgetting to download music or podcasts pre-flight. What if there’s a chatty stranger you need to guard your eardrums against while you’re waiting at your gate? Your flight could even be majorly delayed, giving you more time to kill in the terminal than you anticipated. Whether it’s a quick trip through baggage check or a long layover, knowing the right WiFi code can keep you sane.

We’ve rounded up the up-to-date WiFi codes for 25 of the most popular airports of 2018. Chances are, you’re going to find yourself in one of these airports sometime soon. Want to be a savvy traveler? Copy/paste them into the Notes section of your phone and rest easy until your next pre-flight routine begins. You won’t regret it.

25 25. Madrid Barajas Airport

This Spanish air travel hub offers free WiFi in Terminals 1, 2, and 3, along with select parts of Terminal 4 and boarding areas. It's easy to find: just join the network 'Airport_Free_Wifi_AENA.' There is a definite degree of risk in using unsecured WiFi networks like this one, though.

According to a 2017 Norton Wi-Fi Risk Report, 60% of people believe that their personal information is secure when using public WiFi networks, so cybercriminals have an easier time accessing sensitive files through them. Play it extra safe and choose to use the airport's locked networks instead. Its Iberia Lounge uses the password 'panama,' and the airport's VIP AENA network uses the password 'tcy4332.'

24 24. San Francisco International Airport

There are several airline-specific clubs and lounges offering free WiFi at the San Francisco International Airport. Your gate's proximity to them will determine which network reaches you with the strongest signal.

If you happen to be flying with Air France or sitting in/near their KLM Lounge, login to the network AIRFRANCEKLMLOUNGE with the password 'AFRKLM01.' If you find yourself with access to the Centurion Lounge network, use the password 'MemberSince.' If you're near the airport's Admirals Club, unlock their network with the password 'Prague2018.' Lastly, you can access the United Club International Terminal network named united_club with the password 'CLUB3993.'

23 23. Kuala Lumpur International Airport

Malaysia's busiest airport offers free WiFi that passengers can use for up to 3 hours at a time, after they submit their email addresses to the service provider's site. TripAdvisor reviewers say this WiFi can be spotty anyway, so consider using one of the airport's businesses' networks for the strongest and most reliable connection.

O’Briens Global Cafe has a good network named OBRIENSKLIA, which you can connect to with the password 'obriens123.' The airport's various lounges also have great WiFi options. Look out for strong signals titled Premium_Red_Lounge (password: 'everyonecanfly'), GoldenLoungeWiFi (password: 'malaysia1'), Emirates_Lounge (password: 'bcde12345'), and Premium Plaza Lounge (password: 'plaza2017').

22 22. John F. Kennedy International Airport

Flying into JFK on your way to NYC? Live like a real New Yorker by saving your money on data and using free WiFi instead. The best places to get WiFi in JFK are the lounges (or whatever spot at your gate is closest to a lounge). FYI: This is the first of many airports on this list with a Delta Sky Club network. Every Delta Sky Club network has the same password: 'happy'!

The rest of the networks and passwords at JFK are as follows. AlitaliaVIP: password 'romamilano.' British Airways Lounge: password 'budapest.' Wingtip Lounge: password 'WingtipS.' Alaska Lounge: password 'MostWestCoast.' Etihad Lounge: password 'etihadjfk.' (That Etihad network can be accessed from most places in Terminal 4!)

21 21. Suvarnabhumi Airport

Suvarnabhumi Airport is also called Bangkok Airport, so if you're flying into Thailand's capital you're likely to land here. You can get WiFi here by opening your browser and plugging your email address into a form. This gets you onto the BKK network's free WiFi for 2 hours max.

Long layover? Lucky for you, it's a pretty cool place to pass the time with or without WiFi.

"You can get to-go pad thai and mango sticky rice on either side of security, which is helpful if you have a long layover,” says Emirates flight attendant Annie Kingston. “You can even buy beautiful Thai orchids on the way out that are properly packaged so that they can survive your upcoming flight."

20 20. Denver International Airport

If you're flying to or from  the Denver International Airport, you'll need to remember that rule about the Delta Sky Club networks of the world. The password 'happy' will get you onto the network at this airport and all its other locations.

If you're too far from the Delta Sky Club to get a strong signal within this airport, try logging into the Admirals Club network. You can access it with the password 'Prague2018.' Like the folks pictured above in the Denver Airport, you can unlock your way onto the world wide web. Your Instagram, Facebook, and Snapchat notifications await!

19 19. Seoul Incheon International Airport

Touch down into Incheon Airport for free and open WiFi on the network simply named Airport WiFi. But remember the risks of using an unsecured network! It's safer, especially when travelling internationally with sensitive personal files on your electronic devices, to choose a secured WiFi network.

Login to the Asiana Airlines network (called OZ_Business) with the password '032744123.' Login to Korean Airlines with the network name KAL Lounge and password 'ke053017081.' Lastly, the Sky Hub Lounge WiFi is accessible through the network name Airport@skyhub_W2_5G and password 'skyhub1234.' This is yet another amazing airport to spend a layover in, so feel free to enjoy free WiFi at Incheon's many neat cafes, too.

18 18. Indira Gandhi International Airport

The Indira Gandhi International Airport has beautiful art and decor, friendly service workers, and a few distinct options for connecting to WiFi. If you happen to end up in Terminal 3, you can login to networks named both LOUNGE A and LOUNGE B via the password '6660055500.'

For passengers in other terminals, the airport's Premium WiFi network can be unlocked using the password 's7k62c.' All of these options don't require you to submit any personal info before connecting. That you get minimum risk and maximum security while you scroll through your feed to pass time during an Indira Gandhi International Airport layover.

17 17. Guangzhou Baiyun International Airport

The best place to access WiFi in Guangzhou Baiyun International Airport is in Terminal A. If you find yourself waiting there, you can login to the secure network gbdya by using the password '020itcbytj.'

If you have a Weibo account or a cellphone with a Chinese number (a good idea for anybody visiting China) you can easily log on to the AIRPORT-WIFI-FREE network. It will give you a limited connection until you receive a code on your phone or Weibo account, which you can plug into your browser for 300 minutes of free WiFi.

If neither of those options work for you, some travelers say that the airport’s Oak Tree Café has free and open WiFi along with great cappuccinos.

16 16. Soekarno–Hatta International Airport

This Indonesian airport is located on the island of Java. For anyone who loves tropical islands, colorful Indonesian culture, or yes, coffee, Soekarno-Hatta International Airport is ready to welcome you. It's called the 'mega-hub' of the Asia-Pacific region, and sees millions of travelers pass through it each year.

If you're one of them, you have a few WiFi options to choose from. The airport offers free WiFi via the network @freewifi.cgk in all terminals, but passengers say this network can have some stability issues. Thankfully Starbucks has free and open WiFi in Terminal 2 and Terminal 3, and so does the Old Town Kopitiam shop. Enjoy that one for some Indonesian authenticity.

15 15. Istanbul International Airport

Istanbul International Airport is pretty huge. You could easily get lost in it if you weren't careful! Thankfully, you can access WiFi there almost everywhere you go. Upstairs by the food court? Login to the PrimeClass_Lounge network with the password 'haveagoodday.' Near the 500-section gates? Try the network eatandgo with the password 'istanbul1.' Near the airport's other Eat & Go? Access the eatandGo2 network with the password 'istanbul2.'

If you're by or in the Takeoff Cafe, login to the takeoff network with the password 'cafe1986.' If you're by the TKLounge network, use the username TK and password 'VISITISTANBUL.' The Tav Airport Hotel is also located the airport, accessible via the network name TAVAIRPORTHOTELS and password 'airporthotel2018.'

14 14. Frankfurt Airport

Free WiFi is all over Frankfurt airport via the network name Frankfurt Airport, Hotspot Telekom and the password 'Internet.' This requires you to enter your name and email address, but gives you unlimited access to the web and doesn't request any more sensitive personal info. In basic terms: you can trust it.

Frankfurt is one of the world's most popular airports because of it's location right in the middle of Europe. If you're planning your own Eurotrip for the near future, we're willing to bet that you'll pass through Frankfurt Airport at some point. Be prepared to use the airport as an Internet check-in point, where you can finally check emails and messages for free as you travel.

13 13. Amsterdam Airport Schiphol

Amsterdal Airport Schiphol has free WiFi throughout most of the airport, but you can only access it for a maximum of one hour. Connect via the network name Airport_Free_WiFi and by checking the terms and conditions box.

If you need more than one hour of WiFi time, we don't blame you. Try connecting to the British Airways Lounge network by using the password 'singapore,' or the Crown Lounge via the network name KLM-Lounge and password '#KLM'. You can also visit one of the airport's popular cafes and enjoy WiFi without time limits on networks with passwords that the baristas change every so often. For access there, just ask.

12 12. Dallas Fort Worth International Airport

Dallas Forth Worth is one of those airports that offers free Wi-Fi throughout to anyone willing to fill out a form and register for it. The network name is ATT WiFi, and the airport explains that you'll need to open a browser and fill in your details before the WiFi will unlock for you. At that point, you can use it for free for 240 minutes. You can buy extra time or data using your credit card.

Other options for WiFi at DFW include the British Airways Lounge (password: 'Singapore'), Delta Sky Club (password: 'happy'), Admirals Club (password: 'Houston2017') or Centurion Lounge (Password: 'MemberSince').

11 11. Paris Charles De Gaulle Airport

Paris Charles De Gaulle's WiFi has been free for a few years now. It doesn't require any password for up to 240 minutes of use. After that, you can purchase more WiFi using a credit card or PayPal account. It costs about 2.90 Euros per 20 minute sessions beyond the 240 minute mark.

If you want the very best WiFi this airport has to offer, another option is available to you. The fastest Internet connection is saved for passengers willing to pay about 10 Euros for a 24 hour pass. This gives you a password that you can use on up to five devices! Totally worth it for guaranteed high-speed WiFi in a pinch.

10 10. Shanghai Pudong International Airport

Don't let boredom overtake you at Shanghai Pudong! There's no reason to be disconnected at this international airport. It offers freely accessible WiFi via the network #AirportPVG-WIFI. All you need to do is login with the username: 576518 and password '3852.'

If you happen to be at a location within the airport where that network's signal is weaker than the Lounge 77's, don't sweat. You can log on to that one instead, by using the network name Lounge77  and password 'Lounge77.' Easy enough to remember? We think so. Both of these options are password protected and don't require you to enter any personal info.

9 9. Singapore Changi Airport

You can get free WiFi pretty easily in Singapore Changi if you need it for just 3 hours or less. In this case, just open the network #WiFi@Changi, open a browser, and check the box beside "3 Hours Free WiFi access."

There's another check box for "24 Hours Free WiFi access," but that option requires you to have a local number and the latest version of the airport's app, iChangi. Both 3 hour and 24 hour WiFi login info can be obtained at WiFi Kiosks, too. Just select 'Via Info Counter/Kiosk' on the login page that pops up when you connect to the #WiFi@Changi network. You can find these cool kiosks in every terminal.

8 8. Chicago O’Hare International Airport

Chicago O'Hare is yet another amazing airport for you to visit with time to kill. Layovers and delays are made fun with help of donations from the Chicago Field Museum, like the towering dinosaur skeleton replica at the departure area. If you find yourself wanting to browse the web while you wait anyway, this airport gives you several good WiFi options.

Access the Admirals Club network with the password 'Prague2018,' or the British Airways Lounge with the password 'lasvegas.' If you're in Terminal 5, connect to the Swiss Chicago network with the password 'swissord.' If you're near the SAS Lounge, login to the network saswipoint with the password 'sashome.' Choose whichever has the strongest signal for you.

7 7. London Heathrow Airport

As you might expect, London's massive (and massively popular) Heathrow Airport has plenty of different WiFi networks for you to consider using. It mostly depends on where you end up sitting. If you're near the arrivals hall in Terminal 2, access the PPLLHR network with the password 'plazalhr.' If you're near the Admirals Club, get 40 minutes of free WiFi with password 'Prague2018.'

In Terminal 4, try the EYLHRLG network with the password 'asdfg12345.' That looks like a keyboard smash, but it's legit. That terminal's BALoungeWiFi network is also accessible with the password 'vancouver.' -- In Terminal 3, try the network EK LOUNGES via the password 'FLYEKA380,' or The Virgin Atlantic Clubhouse WiFi simply via the password 'loved.'

6 6. Hong Kong International Airport

This is an airport so busy, you definitely want your best apps on hand. You can choose to use the publicly accessible network found throughout the airport if you're willing to submit your email address, and honestly, if no other network signals show up strongly on your phone, we would go for this option. The network name is #HKAirport Free WiFi.

If your gate happens to be near the Cathay Wing Lounge, access its locked WiFi with the password 'cathay1234' instead. The Plaza Premium Lounge's network name is Plaza Premium Lounge (obvs) and password is 'plaza2018.' The Centurion Lounge network's password is 'MemberSince.' Any of these options will be faster than the open access airport-wide one.