When you install electrical receptacles in your home, you must follow the code set forth in the National Electrical Code guidelines, but also your local electrical codes. Generally, state and federal codes are the same, but some communities might have stricter guidelines pertaining to outlet or types of outlets.
Wall space where you put electrical outlets is defined as not being broken by fireplaces, moving wall panels and doorways. Windows do not count as broken space unless the window is a ceiling to floor unit. When you are determining where the outlets must be according to code, you don't consider a window panel a break when placing outlets. Therefore, outlets can be installed below a window.
Outlet requirements might require that you place an outlet under a window in family rooms, living rooms, bedrooms, dining rooms and kitchens or similar rooms. Outlets must be placed every 12 feet on a wall without breaks. And wall space that is at least 2 feet long must have an outlet. However, if you have baseboard heating, no outlets can be installed above the baseboard heaters. You must arrange the outlets to meet code, but spaced so they aren't above the heating baseboards.
Height of Receptacles
When deciding whether a receptacle can be installed under a window, you need to measure the height of the electrical box from the finished floor. The general rule is that outlets must be 15 to 48 inches from the floor.
Type of Receptacle
The receptacles you use in every room of the house, including those areas under windows, must be tamper-resistant outlets of 15 to 20 amps. Tamper-resistant outlets have a shutter that is spring-loaded. When you remove a plug from the outlet, the shutter closes off the slots. When you insert a plug with two prongs into the slots, the spring compresses and allows the plug. If you would only use a plug with one prong or a child tries to stick something in the outlet, the springs won't compress.