Remove classes and id from wp_nav_menu

function my_special_nav_class( $classes, $item )
{
    foreach($classes as $key=>$class){
        if(preg_match('/^menu-item(.*)|^page(.*)/i',$class)){
            unset($classes[$key]);
        }
    }
    return $classes;
}
add_filter( 'nav_menu_css_class', 'my_special_nav_class', 10, 2 );

this filter will remove all the classes beginning as ‘menu-item’ and ‘page’.

function my_special_nav_id($id) {
    return '';
}
add_filter( 'nav_menu_item_id', 'my_special_nav_id' );

this filter will remove the id of ‘li’ element