How do I select the correct board and port in Arduino IDE?

If uploads fail, the most common cause is simple: the IDE is targeting the wrong board, the wrong port, or both.

Step 1: Select your board

  1. Open Tools > Board.
  2. Choose the exact board you have (for example, Arduino Uno, Arduino Nano, or an ESP32 board).

If you are using a compatible board, the board name may be different than the original. When in doubt, check the product page or listing for the exact board profile.

Step 2: Select the correct port

  1. Plug the board in via USB.
  2. Open Tools > Port.
  3. Select the port that appears when the board is connected (on Windows it looks like COM3, COM5, etc.).

Quick sanity check

  • Unplug the board and watch the port list. If the port disappears, you found the right one.
  • Try a different USB cable. Many cheap cables are charge-only and do not carry data.
  • Close other apps that might be using the port (Serial Monitor, other IDEs, 3D printer tools).

If the Port menu is missing or empty

That usually means your computer does not see the board at all. This can be drivers, cable, or a bad USB port.

Bottom line

Pick the right board first, then pick the port that appears only when the board is plugged in. If no ports appear, fix the USB connection and drivers before chasing code issues.

Related: Why can't I upload code? · Why won't my board show up in COM ports? · How do I install Arduino IDE and drivers?