Although it sounds a bit remote, crossing the border from Thailand to Laos through the Nong Khai/Thanaleng (Thail/Lao side) is very straightforward, with no scams.
As other borders along the Mekong river, the actual crossing between the countries is on a bridge. This bridge is called the Friendship Bridge. On the other side lies Vientiane, the capital of Laos.
While the Thai immigration office of the border opens at 6AM, the Lao office does not open until 8 AM.
Bangkok to Nong Khai
The most comfortable way to do this is taking a night train.
Train #77 leaves at 6:35pM but arrives 4:15PM (too early!) for 498 THB. A better choice is train #25 that leaves Bangkok at 8PM train and arrives in Nong Khai at around 6:45AM. You will arrive at the border around the time they open, and find no lines. Prices are 898/998 THB (upper/lower berth).
The station staff in Nong Khai might be able to sell you American dollars for the visa, but they might not have the exact amount you need. If plan to cross the border on foot, you can go to the money exchange office located before the border and get your dollars there instead.
Crossing on foot/by bus
The customs boundary post on the Thai side (17.867740, 102.720684) is located 1.5 km from the Nong Khai train station, so you can walk instead of paying for an overpriced tuk-tuk ride.
You will find a bunch of shops right before the boundary post, including a 7-Eleven and a money exchange office.
This office opens at 8:15AM and has very good exchanges rates. There, we bought 35 USD per person for the visa on arrival (check here the price for your country, but double-check with your government’s website, as always). We also exchanged most of our remaining Thai bahts for Lao kips. They are also nice enough to give you free Wi-Fi if you need it.
Once you walk towards the border, you will spot a photo booth for visa ID pictures on your left. Next to that is the Thai immigration office where you will get the exit stamp on your passport upon submitting your departure card. If you have lost that card, you can get a new one there.
As you exit the office, you will be “forced” to ride a bus across the bridge until Lao’s Thanaleg immigration office. This bus costs 15 THB. If you pay in LAK, it is more expensive, so make sure to keep some bahts instead of exchanging all of them away.
At the Lao immigration office, you will apply for the visa on arrival if you don’t have a visa already. The process takes a few minutes. You need to fill a form and submit it along with your passport, the money in dollars and an ID photo (don’t worry about the dimensions of the picture, as they accept any normal size).
Note that if you decide to pay in a currency that is not American dollars (eg. euros) you will definitely get a very bad exchange rate. They might also just refuse you.
From the border to Vientiane
That’s it! You are in Laos! And there’s a swarm of tuk-tuk drivers willing to take you to Vientiane for very expensive prices (50-100 THB). My friend and I hitchhiked a ride in less than 20 minutes, and were dropped at the Central Bus Station (CBS).
If you are traveling north to Vang Vieng, Luang Prabang or Phonsavan, you will need to take a bus from the Northern Bus Station. Local bus #08 connects CBS and Northern Bus Station. If you are traveling east/south-east, you will need to take a bus to the Southern Bus Station. Buses #23 and #29 connect CBS with Southern Bus Station. Check all other local buses and their timetables here.
Crossing by train
Alternatively, from Nong Khai station you can take a short train to Vientiane (Dongphosy station) for 20 THB. There are only two trins a day, one at 7:30AM and one at 2:45PM.
If you choose to cross the border by train, you will avoid any queues at the bridge. You will get your exit stamp at the Nong Khai train station, and get your visa and entrance stamp at the Vientiane train station. Once in Laos, tuk-tuk drivers will come for you at the station again and offer you rides to Vientiane.
If you would otherwise pay a tuk-tuk drive from the station to the border, taking a train will be cheaper than going through the bridge.
Although tour agencies might tell you otherwise, crossing this border either on foot or by train is a very simple and hassle-free process and you will find no issues doing it on your own.